29.05.2010, 14:39
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.
GivePlayerMoney(playerid, -15);
Originally Posted by Memoryz
Under the gate command of the script that you download, just add this:
Код:
GivePlayerMoney(playerid, -15); You can change 15 to anything you want, but make sure you keep the negative sign "-" infront of it. |
if(GetPlayerMoney(playerid) >= 15)
{
MoveObject(/*positions*/);
SetPlayerMoney(playerid,-15);
}
else
{
SendClientMessage(playerid,COLOR,"You don't have enough money,you need 15$.");
}
Originally Posted by O_x
Quote:
So you can make something like that: pawn Код:
|
Originally Posted by O_x
Quote:
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*/);
GivePlayerMoney(playerid,-15);
}
else
{
SendClientMessage(playerid,COLOR,"You don't have enough money,you need 15$.");
}