08.03.2014, 03:43
ZCMD:
This should work.
Requires the following includes:
a_samp
sscanf2
zcmd
pawn Code:
CMD:command(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new id, sendcommand[50], cmdparams;
if(sscanf(params, "us[50]S[100]", id, sendcommand, cmdparams)) return SendClientMessage(playerid, -1, "USAGE: /command [name/id] [command] [Optional: parameters]");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Invalid Player.");
if(sendcommand[0] == '/') strdel(sendcommand, 0, 1);
CallLocalFunction(sendcommand, "is", id, cmdparams);
SendClientMessage(playerid, 0xFFFF00FF, "Command Sent.");
return 1;
}
Requires the following includes:
a_samp
sscanf2
zcmd

