04.11.2010, 20:42
Okay I'll try to show you...
pawn Код:
if (strcmp("/myname", cmdtext, true, 10) == 0)
{
new string[64];/* With this you create string with enought space for 63 characters...
Doesn't have to be "string[64]"..you can have it like "mytext[some number what you need]" */
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));// This will get the name of a player.
format(string, sizeof(string), "My name is %s", name);
//This will make the text like : My name is Alex_Valde, or what ever your(players who called this commad) name is.
//BUT THIS WILL ONLY CREATE AND FORMAT TEXT AND WILL NOT OUTPUT IT!
GameTextForAll(string, 3000, 3);
//This will create GameTextForAll with your "string", time is in miliseconds (3000), and style (1).
return 1;
}

