SA-MP Forums Archive
Names - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Names (/showthread.php?tid=257575)



Names - iGetty - 26.05.2011

pawn Код:
SendClientMessageToAll(0xAAAAAAAA, "%s has killed thereselves, they will be in the next round.");
How could I get it to say the players name? and how could I do it for multiple commands? :$


Re: Names - Haydn - 26.05.2011

Doesn't %s mean players name?


Re: Names - iGetty - 26.05.2011

Quote:
Originally Posted by gab1971
Посмотреть сообщение
Doesn't %s mean players name?
you must have a variable, though?


Re: Names - Ironboy - 26.05.2011

like this you can
pawn Код:
new name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "Welcome %s to my server!", name);
        SendClientMessage(playerid, 0xFF9900AA, string);



Re: Names - iGetty - 26.05.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
like this you can
pawn Код:
new name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "Welcome %s to my server!", name);
        SendClientMessage(playerid, 0xFF9900AA, string);
Aye, I got it mate, thank you very much.

This forum requires that you wait 120 seconds between posts. Please try again in 49 seconds. :@