Money HELP
#1

Hey guys. I was wondering how to make the money when get under 0 ( example: money = -1 ) to say: ERROR: You don't have money for this.

+REP for the dude who help me.
Reply
#2

Код:
if(GetPlayerMoney(playerid) < 0 ) return SendClientMessage(playerid ,COLOR ,"You don't have enough money!");
Reply
#3

Thanks. +REP
Reply
#4

But now when i have 0 money and buy it i get on -20000 and when i type it again it show that message. I want to make the player money to don't go under 0.
Reply
#5

How about checking if the player has less money than he needs. Example:
pawn Код:
new pMoney = GetPlayerMoney(playerid);

if(pMoney < vSellPrice)
    return SendClientMessage(playerid, -1, "You don't have enough money to buy the vehicle.");
This is just an example, you must change the variables with yours.
Reply
#6

pawn Код:
if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, 0xFF0000FF, "You Don't Have Enough Money To Purchase This.");
Reply
#7

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)