money - 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: money (
/showthread.php?tid=83282)
money -
sggassasin - 24.06.2009
i need a script that when the money gose lower than 0 they get killed coz i am makeing a weapon list where u can buy stuff from but when they do it go into -
So if someone could help me that would be nice
Re: money -
Abernethy - 24.06.2009
Use
pawn Код:
if (GetPlayerMoney(playerid) >= /*AMOUNT OF MONEY HERE*/)
{
GivePlayerWeapon(playerid, /*WEAPONID*/, /*AMMO*/);
}
Re: money -
sggassasin - 24.06.2009
That Did Nothing i need it so that they have to get that ammount of money to buy the weapon or if they buy the weapon and go into the minuse then they get killed
Re: money -
abhinavdabral - 24.06.2009
Just add an IF Condition like if plyers doesnt have enough money, he should get the message that "You dont have enough money to buy weapons". You have to do this in th buy menu of weapons.
Lol..if confused then PM me....I will 100% help you .
Re: money -
Abernethy - 24.06.2009
pawn Код:
if (GetPlayerMoney(playerid) >= /*AMOUNT OF MONEY HERE*/)
{
GivePlayerWeapon(playerid, /*WEAPONID*/, /*AMMO*/);
}
else
{
SendClientMessage(playerid, COLOR_RED, "*** You do not have enough money for this ! ***");
}
Re: money -
sggassasin - 24.06.2009
it gives me this error
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\FRAS2.pwn(989) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\FRAS2.pwn(991) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: money -
sggassasin - 24.06.2009
nvm i got it working thx for the help man
Re: money -
Abernethy - 24.06.2009
No problem