SA-MP Forums Archive
Something is wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Something is wrong (/showthread.php?tid=247986)



Something is wrong - BizzyD - 11.04.2011

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


Re: Something is wrong - Vince - 11.04.2011

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