How to make gates that you must pay
#3

Quote:
Originally Posted by Memoryz
Under the gate command of the script that you download, just add this:

Код:
GivePlayerMoney(playerid, -15);
What it does is subtract $15 from the players cash.

You can change 15 to anything you want, but make sure you keep the negative sign "-" infront of it.
Actually,in that case the gate will open if the player has 15$ or not,if the players has for example 13$,the gate will open and he will have -2$.
So you can make something like that:
pawn Код:
if(GetPlayerMoney(playerid) >= 15)
{
   MoveObject(/*positions*/);
   SetPlayerMoney(playerid,-15);
}
else
{
  SendClientMessage(playerid,COLOR,"You don't have enough money,you need 15$.");
}
EDIT:Sorry forgot something,fixed.
Reply


Messages In This Thread
How to make gates that you must pay - by manunited1878 - 29.05.2010, 14:39
Re: How to make gates that you must pay - by Memoryz - 29.05.2010, 15:20
Re: How to make gates that you must pay - by [XST]O_x - 29.05.2010, 15:26
Re: How to make gates that you must pay - by Memoryz - 29.05.2010, 15:26
Re: How to make gates that you must pay - by manunited1878 - 29.05.2010, 21:06
Re: How to make gates that you must pay - by (SF)Noobanatior - 29.05.2010, 21:11
Re: How to make gates that you must pay - by manunited1878 - 29.05.2010, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)