Quote:
Originally Posted by [MG]Dimi
Like this:
pawn Код:
#include <a_samp>
public OnPlayerSpawn(playerid) { new name[24]; GetPlayerName(playerid,name,24); if(!strcmp(name,"Michael",false)) SendClientMessageToAll(0x00FF00FF,"Michael has spawned!"); return 1; }
|
I wouldn't use 24 but MAX_PLAYER_NAME instead...
pawn Код:
new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name));
SAMP's name length could always change...then you'd be the one going through all of your new name[24] (unless using a stock) changing them to the new size..