13.04.2015, 13:21
Hello, i have a big problem...
Everytime when i use a command like this /pm <id> or /goto <id> or another with <id>, IsPlayerConnected returns 0 (player not connected).
Here is a example cmd:
Everyone know how to solve this? The player is shown on TAB as connected, but cmds doesn't work.
Sorry for my bad english.
Everytime when i use a command like this /pm <id> or /goto <id> or another with <id>, IsPlayerConnected returns 0 (player not connected).
Here is a example cmd:
pawn Код:
CMD:disarm(playerid,params[])
{
if(pInfo[playerid][pLevel] == 0) return SendClientMessage(playerid,red,"{5CAD5C}Error: You're not an admin.");
if(pInfo[playerid][pLevel] >= 1)
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "{B8DBFF}Syntax: /disarm <playerID>");
if(!IsPlayerConnected(id)) return //SendClientMessage with player not connected here.
format(Lstr,sizeof(Lstr),"{F45E43}AdmCmd: You have disarmed %s.",TakeName(id));
SendClientMessage(playerid,yellow,Lstr);
format(Lstr,sizeof(Lstr),"{F45E43}AdmCmd: Admin %s has disarmed you.",TakeName(playerid));
SendClientMessage(id,yellow,Lstr);
ResetPlayerWeapons(id);
return 1;
}
else return 0;
}
Sorry for my bad english.