20.12.2009, 11:25
pawn Код:
stock DisconnectNPC(npcname[]) {
new
n[MAX_PLAYER_NAME],x=0;
while(x!=GetMaxPlayers()) {
GetPlayerName(x,n,sizeof n);
if(!strcmp(n,npcname,true)) break;
x++;
}
if(x==GetMaxPlayers())return INVALID_PLAYER_ID;
Kick(x);
return 1;
}