21.07.2012, 09:29
How i can add if player is not connect then. when admin type /disarm [id] then it says ( player is not connected ) ?
pawn Код:
YCMD:disarm(playerid, params[], help)
{
#pragma unused help
if(P_Data[playerid][pAdmin] < 4) return SCM(playerid, COLOR_RED, "You need to be admin level 4 to use this!");
new
pplayerid,string[64];
if(sscanf(params, "u",pplayerid)) return SCM(playerid, COLOR_RED, "Usage: /disarm [Player ID/Player Name]");
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"has disarm you",GetName(playerid));
SCM(pplayerid,-1,string);
format(string,sizeof(string),""COL_RED"You'r disarm player "COL_WHITE"%s",GetName(pplayerid));
SCM(playerid,-1,string);
ResetPlayerWeapons(pplayerid);
return 1;
}