28.04.2011, 02:23
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.
In your /gaurd command, add this line:
At the bottom of the script, add this function:
Use this function. but not sure it will work or not :P
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;
Код:
ArmourRequested[playerid]=1;
Код:
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; }