Ellenorzi, hogy a megadott néven van-e fent valaki.
stock IsNameConnected(name[]) {
new
ThePlayer[MAX_PLAYER_NAME];
#if defined foreach
foreach(i) {
#else
for(new i=0; i<GetMaxPlayers(); i++)if(IsPlayerConnected(i)) {
#endif
GetPlayerName(i,ThePlayer,sizeof(ThePlayer));
if(!strcmp(ThePlayer,name,true)) {
return 1;
}
}
return 0;
}