Quote:
Originally Posted by ∈ⅹitus
You have unnecessary returns. This would be enough:
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. SendClientMessage(playerid, 0xFFFFFFFF, "You got the weapons."); } else SendClientMessage(playerid, 0xFFFFFFFF, "You're not at the army position."); } return 1; }
|
Looks better in my eyes with the 'unnecessary' returns.