#1

How to make a stock like GetPlayerMoney? example: if(GetPlayerMoney(playerid) >= 50)

All the time he shows me the message "You are poor!" even when I have 100 points in my wallet.
Код:
stock GetPlayerWallet(playerid)
{
	if(Player[playerid][Wallet]) return true;
	return true;
}

CMD:testwallet(playerid, params[])
{
	if(GetPlayerWallet(playerid) >= 50)
	{
		SendClientMessage(playerid, -1, "You are rich!");
	}
	else
	{
		SendClientMessage(playerid, -1, "You are poor!");
	}
	return 1;
}
Reply
#2

That function (It's called a funtion, not a stock) doesn't make any practical sense, here you go;

PHP код:
GetPlayerWallet(playerid) return Player[playerid][Wallet]; 
Reply
#3

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)