19.09.2009, 18:57
Hello,
im sorry,i know ive asked a lot of questions lately,im just starting to script and i need some tips.
i've just built a weapons menu,but they're free ><
i need to know how to create prices for each weapon.
For example ,if a weapon cost 1500$,i've tried to do GivePlayerMoney(playerid,-1500);
it works,BUT,it gets the player -1500$ even if he have 0$,so it comes red and suddently i have -1500$,shows on my HUD,
but i need to make ,that like if a player have 1000$,it will say "You dont have enough money to buy this item".
Thanks in advance.
PS:if you just give me an example for only one weapon,its good i will understand how,and i'll do it for all rest
if the menu script is required,ask me
i tried to search for other topics that require help like i do,but i didnt find,so i started a new one,if i there is already a topic like this,please excuse me,and link me the other topic so i can browse it.
im sorry,i know ive asked a lot of questions lately,im just starting to script and i need some tips.
i've just built a weapons menu,but they're free ><
i need to know how to create prices for each weapon.
For example ,if a weapon cost 1500$,i've tried to do GivePlayerMoney(playerid,-1500);
it works,BUT,it gets the player -1500$ even if he have 0$,so it comes red and suddently i have -1500$,shows on my HUD,
but i need to make ,that like if a player have 1000$,it will say "You dont have enough money to buy this item".
Thanks in advance.
PS:if you just give me an example for only one weapon,its good i will understand how,and i'll do it for all rest
if the menu script is required,ask me
i tried to search for other topics that require help like i do,but i didnt find,so i started a new one,if i there is already a topic like this,please excuse me,and link me the other topic so i can browse it.