18.02.2017, 07:44
I've tried to make an /fakecmd for administrators. but when I try
the command ingame it doesn't make any cmd for the "TargetID"..
If someone could fix it or tell me what I did wrong I will be thankful.
the command ingame it doesn't make any cmd for the "TargetID"..
If someone could fix it or tell me what I did wrong I will be thankful.
PHP Code:
CMD:fakecmd(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4) return SendClientMessage(playerid, COLOR_RED, "ERROR: Insufficient Permissions!");
if(Dead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[INFO]You can't use commands while being dead!");
new string2[20];
new TargetID;
if(sscanf(params, "us[20]", TargetID,string2)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "Usage: /Fakecmd [PlayerID/PartOfName] [Command]");
SendClientMessage(playerid, 0x00FFFFFF, "Fake CMD Sent.");
CallRemoteFunction(string2,"d",TargetID);
return 1;
}