/oldstats command help
#1

Hello everyone , i have made this command . It went all good , till i didn't try it . Heres the command :

pawn Код:
if(strcmp(cmd, "/oldstats", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /oldstats [playerid/PartOfName] [money] [playinghoues]");
                    return 1;
                }
                new playa;
                new money;
                new playingh;
                playingh = strval(tmp);
                playa = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                money = strval(tmp);
                PlayerInfo[playa][pDonateRank] = 1;
                SafeGivePlayerMoney(playa, money);
                PlayerInfo[playa][pExp] += playingh;
                PlayerInfo[playa][pPlayingHours] += playingh;
                format(string, sizeof(string), "%s money set to : %d ! Players respect points set to : %d ! Players donate rank set to 1 !", playa, money, playingh);
                SendClientMessage(playerid, COLOR_RED, string);
                format(string, sizeof(string), "Admin has given you your stats back ! money : %d ! Respect points : %d ! Donate rank : 1  !", playa, money, playingh);
                SendClientMessage(playa, COLOR_RED, string);
                SendClientMessage(playa, RED, "Type /levelup to level up ! Type /stats to see your stats ! ");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not an Admin !");
                return 1;
            }
        }
        return 1;
    }
The only thing that is working inside is money adding
PS. donor rank 1 should be gratis , but neather is it working :/
IF you can explean me what did i do wrong inside ..
Reply
#2

Bump :/ , please help me :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)