How to make gates that you must pay
#1

Hey, how to like gates where you must pay to go though the gates, I just need a script, then you can tell me where to edit.
Reply
#2

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

Quote:
Originally Posted by O_x
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);
}
else
{
  SendClientMessage(playerid,COLOR,"You don't have enough money,you need 15$.");
}
It will still subtract 15 dollars
Reply
#5

Quote:
Originally Posted by O_x
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.
Can you please give me a full script? just mark there i have to write the cords..im a nooooooooooooooooooooooooooob.

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
#6

that will reset there money to -15
try
pawn Код:
if(GetPlayerMoney(playerid) >= 15)
{
   MoveObject(/*positions*/);
   GivePlayerMoney(playerid,-15);
}
else
{
  SendClientMessage(playerid,COLOR,"You don't have enough money,you need 15$.");
}
Reply
#7

Can you please give me a full script? im a nooooooooooooob, then you can say where i have to place the cordinates
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)