Gun shop help :/
#2

Код:
if(strcmp(cmd, "/deserteagle", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
			if(IsPlayerInRangeOfPoint(playerid, 3,250.0484,66.2467,1003.6406)) // you set coords where you should be to initiate this cmd
          	{
   				if(GetPlayerMoney(playerid) < 1000)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for Desert Eagle");
					        return 1;
                        }
					    else
					    {
	             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought Desert Eagle for 1000$");
	             			SafeGivePlayerMoney(playerid, - 1000);
	             			SafeGivePlayerWeapon(playerid, 24, 100); // 24 is gun ID of deagle, you can find them all on samp wiki, 100 is ammo
						}
			}
		}
		return 1;
	}
Edit: Bracklets "{" and "}" got little bit fucked up, just move them on correct place
Reply


Messages In This Thread
Gun shop help :/ - by Randomai - 21.02.2011, 15:27
Re: Gun shop help :/ - by 77ther - 21.02.2011, 15:37
Re: Gun shop help :/ - by Randomai - 21.02.2011, 16:05
Re: Gun shop help :/ - by 77ther - 21.02.2011, 16:37

Forum Jump:


Users browsing this thread: 1 Guest(s)