跳到主要內容

GetGameText

注意

此函式於 omp v1.1.0.2612 版本中新增,在更早的版本中無法使用!

Description​

Returns all the information on the given game text style.

NameDescription
playeridThe ID of the player whose gametext is being read.
styleThe style of text to get the data for.
message[]Return array for the text string.
len = sizeof (message)Size of the output.
&timeThe time the gametext was originally shown for.
&remainingHow much of that time is still remaining.

Returns​

true - The function was executed successfully.

false - The function failed to execute. This means the player specified does not exist or the style is invalid.

Examples​

public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid, "Welcome to the server!", 5000, 3);

new
message[32],
time,
remaining;

GetGameText(playerid, 3, message, sizeof(message), time, remaining);
// message = "Welcome to the server!"
// time = 5000
return 1;
}