GiveAllScore does NOT give score to players
#1

Hello mates ,

pawn Код:
CMD:giveallscore(playerid,params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(admin(playerid)>3)
                {
                        new ammount;
                    if(!sscanf(params, "i", ammount))
                        {
                        new string[500];
                                sendadmincmd(playerid,"GIVEALLSCORE");
                                PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
                                format(string,100,"(admin) You have given all players score %d.",ammount);
                                SendClientMessage(playerid,COLOR_ORANGERED,string);
                                format(string,100,"~b~ADMIN: ~w~~h~You have given all players score %d.",ammount);
                                message(playerid,string,5000);
                                for(new i;i<MAX_PLAYERS;i++)
                                {
                                        if(IsPlayerConnected(i))
                                        {
                                            format(string,500,"(admin) Administrator ''%s(%d)'' have given all players  score %d.",pNick(playerid),playerid,ammount);
                                                SendClientMessage(i,COLOR_ORANGERED,string);
                                                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                                                format(string,500,"~b~ADMIN: ~w~~h~Administrator ''%s(%d)'' have given all players score %d.",pNick(playerid),playerid,ammount);
                                                message(i,string,5000);
                                                switch(random(5))
                                                {
                                                        case 0: PlayerInfo[i][dmscore]++;
                                                        case 1: PlayerInfo[i][racescore]++;
                                                        case 2: PlayerInfo[i][timescore]++;
                                                        case 3: PlayerInfo[i][groupscore]++;
                                                        case 4: PlayerInfo[i][duelscore]++;
                                                }
                                                SetPlayerScore(i,GetPlayerScore(i)+ammount);
                                        }
                                }
                        }else SendClientMessage(playerid, COLOR_MAROON,"(admin) /Giveallscore (ammount)."),message(playerid,"~b~ADMIN: ~w~~h~Correct usage: /Giveallscore (ammount).",5000);
                }else message(playerid,"~b~ADMIN: ~w~~h~Access denied, You don't have privillage to this command.",5000),SendClientMessage(playerid,COLOR_MAROON,"(admin) Access denied, You don't have privillage to this command.");
        }
        return 1;
}
Reply


Messages In This Thread
GiveAllScore does NOT give score to players - by iAnonymous - 23.05.2014, 12:33
Re: GiveAllScore does NOT give score to players - by Fred1993 - 23.05.2014, 12:39
Re : GiveAllScore does NOT give score to players - by S4t3K - 23.05.2014, 12:45
Re: GiveAllScore does NOT give score to players - by iAnonymous - 23.05.2014, 12:50

Forum Jump:


Users browsing this thread: 1 Guest(s)