11.07.2018, 00:46
No because it's nothing from the command itself, You should do something like.. An array defined globally that stores the ID of the player getting arrested, so you can use this array instead of "targetid".. Example:
You can create either an array or an enum..
or an array..
or
and instead of using "targetid" in the "/bc" command, use the enum or the array..
You can create either an array or an enum..
PHP код:
enum pinfo
{
pArresting
}
new PlayerInfo[MAX_PLAYERS][pinfo];
PHP код:
new ArrestingPlayer[MAX_PLAYERS];
PHP код:
cmd:arrest(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/arrest [target]");
ArrestingPlayer[playerid] = targetid;
}
PHP код:
cmd:arrest(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/arrest [target]");
PlayerInfo[playerid][pArresting] = targetid;
}