Quote:
Originally Posted by kartik
pawn Код:
stock PID(const Name[]) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new pName[MAX_PLAYER_NAME]; GetPlayerName(i, pName, sizeof(pName)); if(strcmp(Name, pName, true)==0) { return i; } } } Stock pname(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); return name; }
format(line, sizeof(line), "*%s(%d) laosm At %s.(%d)", pname(playerid),PID(playerid),pname(nearestplayer),PID(nearestplayer)); SendClientMessage(GREEN, line);
|
It's not stolen , it was from a /getid cmd i was working on ! Lol I just forgot I had to supply a Name ! sorry