Something is wrong
#1

Hello, I am scripting a Gold coin system. And i have made a /goldcoins command. Where it shows you how many coins you have left. And this is what happends: When you have 1 gold coin. It says you have three(3) for some reason. This is my /goldcoins command.

pawn Код:
if(strcmp("/goldcoins",cmdtext, true, 10) == 0)
    {
        if(PlayerInfo[playerid][pVipCoin] >= 0)
        {
            new string[128];
            format(string,sizeof(string),"You have: %d Gold coins left",pVipCoin);
            SendClientMessage(playerid,COLOR_GOLD,string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GOLD, "You dont have any Gold Coins left");
        }
        return 1;
    }
Anyone knows whats wrong?

Thanks, Alex
Reply
#2

I guess this (pVipCoin) is the third item in your enumerator. To make it work, you need the whole PlayerInfo thing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)