Guard/Armor ppl, so they have to accept it!
#6

You can code a function for it aswell.
First create a global variable (on top of script) which contains information about whether any player has requested to guard them or not.
Код:
new ArmourRequested[MAX_PLAYERS]=-1;
In your /gaurd command, add this line:

Код:
ArmourRequested[playerid]=1;
At the bottom of the script, add this function:

Код:
stock AcceptArmour(playerid, fromID, amount)
{
       if(ArmourRequested[playerid]==1)
       {
               GivePlayerMoney(playerid, -amount);
               GivePlayerMoney(fromID, amount);
               SendClientMessage(playerid, COLOR, "Accepted Armour");
               ArmourRequested[playerid]=0;
       }
       else
       {
       }
       return 1;
}
Use this function. but not sure it will work or not :P
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)