What's wrong with this command?
#7

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..

PHP код:
enum pinfo
{
     
pArresting
}

new 
PlayerInfo[MAX_PLAYERS][pinfo]; 
or an array..

PHP код:
new ArrestingPlayer[MAX_PLAYERS]; 
PHP код:
cmd:arrest(playeridparams[])
{
      new 
targetid;
      if(
sscanf(params"u"targetid)) return SendClientMessage(playeridCOLOR_RED"/arrest [target]");
      
ArrestingPlayer[playerid] = targetid;

or
PHP код:
cmd:arrest(playeridparams[])
{
      new 
targetid;
      if(
sscanf(params"u"targetid)) return SendClientMessage(playeridCOLOR_RED"/arrest [target]");
      
PlayerInfo[playerid][pArresting] = targetid;

and instead of using "targetid" in the "/bc" command, use the enum or the array..
Reply


Messages In This Thread
What's wrong with this command? - by Thanks - 10.07.2018, 23:29
Re: What's wrong with this command? - by JasonRiggs - 10.07.2018, 23:52
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:05
Re: What's wrong with this command? - by JasonRiggs - 11.07.2018, 00:23
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:31
Re: What's wrong with this command? - by Tass007 - 11.07.2018, 00:44
Re: What's wrong with this command? - by JasonRiggs - 11.07.2018, 00:46
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:50
Re: What's wrong with this command? - by Tass007 - 11.07.2018, 00:59
Re: What's wrong with this command? - by Thanks - 11.07.2018, 01:14

Forum Jump:


Users browsing this thread: 1 Guest(s)