buying a armor problem.
#1

sorry if i posted in a wrong section,

so here it is, it doesnt get the player money when they type /heal , here is the line

Код:
	if (strcmp("/armor", cmdtext, true, 10) == 0)
    {
        if(GetPlayerMoney(playerid) <3000) return SendClientMessage(playerid, COLOR_RED, "You need more money to buy a armour !");
        SetPlayerArmour(playerid, 100);
        return 1;
    }
it has no error, but it doesnt get the player money, how to fix?
Reply
#2

pawn Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
{
    if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, COLOR_RED, "You need more money to buy a armour !");
    else
    {
        SetPlayerArmour(playerid, 100);
        GivePlayerMoney(playerid,-3000);
    }
    return 1;
}
Reply
#3

Isn't GetPlayerMoney
It's
pawn Код:
GivePlayerMoney(playerid,-2500);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)