07.12.2009, 06:33
Top of the script:
Command:
pawn Код:
#define ARMY_POSITION 123.0, 123.0, 123.0 // Your coords here.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/armyequip", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, ARMY_POSITION)) // You can change the range from 3.0 to anything you'd like.
{
GivePlayerWeapon(playerid, 24, 100); // Give deagle with 100 ammo.
GivePlayerWeapon(playerid, 29, 300); // Give MP5 with 300 ammo.
GivePlayerWeapon(playerid, 31, 400); // Give M4 with 400 ammo.
return SendClientMessage(playerid, 0xFFFFFFFF, "You got the weapons.");
}
return SendClientMessage(playerid, 0xFFFFFFFF, "You're not at the army position.");
}
return 1;
}