Equip?
#10

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


Messages In This Thread
Equip? - by Namaco - 07.12.2009, 05:39
Re: Equip? - by Abernethy - 07.12.2009, 05:49
Re: Equip? - by Namaco - 07.12.2009, 05:58
Re: Equip? - by Finn - 07.12.2009, 06:33
Re: Equip? - by Namaco - 07.12.2009, 06:34
Re: Equip? - by MenaceX^ - 07.12.2009, 06:44
Re: Equip? - by Namaco - 07.12.2009, 06:49
Re: Equip? - by Finn - 07.12.2009, 15:44
Re: Equip? - by DeathOnaStick - 07.12.2009, 16:14
Re: Equip? - by Finn - 07.12.2009, 17:13

Forum Jump:


Users browsing this thread: 1 Guest(s)