03.05.2012, 12:11
I've created some function for you:
Код:
stock FindPlayer(const name[]) { new pt[MAX_PLAYER_NAME], Names[MAX_PLAYER_NAME]; for(new i = 0,j = GetMaxPlayers(); i < j; i++) { if(!IsPlayerConnected(i)) continue; format(pt,256,"%i",i); GetPlayerName(playerid,Names,MAX_PLAYER_NAME); if(strfind(Names,name,true) != -1) return pt; } format(pt,256,"-1"); return pt; }