dcmd_adkill(playerid,params[])
{
new string[128];
new ID;
new cmdreason[100];
if(sscanf(params,"us[100]",ID,cmdreason))
{
SendClientMessage(playerid,COLOR_ERROR,"**USAGE: /adkill (Player Name/ID) (Reason)");
SendClientMessage(playerid,COLOR_LIME,"It will Kill the player");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot kill them.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(IsKidnapped[playerid] != 0)
{
SendClientMessage(playerid,COLOR_ERROR,"**You are Kidnaped you can't use this command");
return 1;
}
format(string,sizeof(string),"%s has killed %s(%d) for reason: %s.",PlayerName(playerid),PlayerName(ID),ID,cmdreason);
SendClientMessageToAll(COLOR_ADMIN,string);
format(string,sizeof(string),"[ADMIN-COMMAND] %s(%d) has used /adkill on %s(%d)",PlayerName(playerid),playerid,PlayerName(ID),ID);
SendClientMessageToAllAdmins(string);
SetPlayerHealth(ID,0);
return 1;
}
if(sscanf(params,"rs[100]",ID,cmdreason))
if(sscanf(params,"us[100]",ID,cmdreason)) return SendClientMessage(playerid,COLOR_ERROR,"**USAGE: /adkill (Player Name/ID) (Reason)");
if(sscanf(params,"us",ID,cmdreason))
Not that command , all commands were working but i stopped scripting for a while then tried to test it and found that all commands don't work , this command is just an example of many.
|