How to make gates that you must pay - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make gates that you must pay (
/showthread.php?tid=151208)
How to make gates that you must pay -
manunited1878 - 29.05.2010
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.
Re: How to make gates that you must pay -
Memoryz - 29.05.2010
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.
Re: How to make gates that you must pay -
[XST]O_x - 29.05.2010
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.
Re: How to make gates that you must pay -
Memoryz - 29.05.2010
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
Re: How to make gates that you must pay -
manunited1878 - 29.05.2010
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.
|
Re: How to make gates that you must pay -
(SF)Noobanatior - 29.05.2010
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$.");
}
Re: How to make gates that you must pay -
manunited1878 - 29.05.2010
Can you please give me a full script? im a nooooooooooooob, then you can say where i have to place the cordinates