GameTextForAll

From SA-MP Wiki

Jump to: navigation, search


With the use of this function, you are able to show a message on the screen of all the online players. The style of the message depends on the one you choose.


Parameters:
(const string[], time, style)
const string[]The line of text you want to show to everyone.
timeThe time you want the text to show up. This is in milliseconds.
styleThe style you want to show the text in.


ReturnsThis function doesn't return a specific value


public OnPlayerDeath(playerid, killerid, reason)
{
    // This example shows a large, white text saying "[playerName] has
    // passed away" on everyone's screen, after a player has died or
    // has been killed. It shows in text-type 3, for 5 seconds (5000 ms)
    new name[ 24 ], string[ 64 ];
    GetPlayerName( playerid, name, 24 );
 
    // Format the passed-away message properly, and show it to everyone!
    format( string, sizeof(string), "~w~%s has passed away", name );
    GameTextForAll( string, 5000, 3 );
 
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages