Helper doesn't save[+rep]
#4

Quote:
Originally Posted by Chris_Morrison
Посмотреть сообщение
Hello
My helper system doesn't save when the player is disconnected
pawn Код:
if(strcmp(cmd, "/makehelper", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "{33CCFF}USAGE:{FFFFFF} /makehelper [playerid/PartOfName] [1-yes ; 0-no]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        //GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(level == 0)
                        {
                            printf("[SERVER]: %s has removed %s from the helper team.", sendername, giveplayer);
                            format(string, sizeof(string), "   You have been removed from the helper team by %s", sendername);
                            SendClientMessage(para1, COLOR_WHITE, string);
                            format(string, sizeof(string), "   You have removed %s from the helper team.", giveplayer);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            format(string, 128, "AdmWarning: %s has removed %s from the helper team.", sendername,giveplayer);
                            ABroadCast(COLOR_YELLOW,string,1);
                            format(string, 128, "HlpWarning: %s has removed %s from the helper team.", sendername,giveplayer);
                            HBroadCast(COLOR_YELLOW,string,1);
                            PlayerInfo[para1][pHelper] = 0;
                        }
                        else if(level == 1)
                        {
                            printf("[SERVER]: %s has added %s to the helper team.", sendername, giveplayer);
                            format(string, sizeof(string), "   You have been added to the helper team by %s", sendername);
                            SendClientMessage(para1, COLOR_WHITE, string);
                            format(string, sizeof(string), "   You have added %s to the helper team.", giveplayer);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            format(string, 128, "AdmWarning: %s has added %s to the helper team.", sendername,giveplayer);
                            ABroadCast(COLOR_YELLOW,string,1);
                            format(string, 128, "HlpWarning: %s has added %s to the helper team.", sendername,giveplayer);
                            HBroadCast(COLOR_YELLOW,string,1);
                            PlayerInfo[para1][pHelper] = 1;
                        }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
            }
        }
        return 1;
    }
does it save on 'Users'.
Give me your 'PlayerInfo'

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Your problem is not in this bit of code. It is under wherever you are file writing/saving.
He was faster.
Reply


Messages In This Thread
Helper doesn't save[+rep] - by Chris_Morrison - 14.03.2012, 10:19
Re: Helper doesn't save[+rep] - by Dripac - 14.03.2012, 10:26
Re: Helper doesn't save[+rep] - by ReneG - 14.03.2012, 10:26
Re: Helper doesn't save[+rep] - by Issam - 14.03.2012, 10:34
Re: Helper doesn't save[+rep] - by Daddy Yankee - 14.03.2012, 10:35
Re: Helper doesn't save[+rep] - by Dripac - 14.03.2012, 10:40
Re: Helper doesn't save[+rep] - by Chris_Morrison - 14.03.2012, 10:56

Forum Jump:


Users browsing this thread: 3 Guest(s)