Wrong code in ladmin :(
#1

Hi guys,

look i scripted this in my ladmin:



pawn Код:
CMD:applyforadmin(playerid,params[])
{
            new NeededScoreAdmin;
            new CheckPlayerLevel;
            new AcceptPlayerForAdmin;
            AcceptPlayerForAdmin = playerid;
            NeededScoreAdmin = 30000;
            CheckPlayerLevel = playerid;
            if(GetPlayerScore(playerid) < NeededScoreAdmin)
            SetPlayerScore(CheckPlayerLevel, -10);
            dUserSetINT(PlayerName2(playerid)).("level",(1));
            SendClientMessage(AcceptPlayerForAdmin,red,"Accepted As Tester (Level 1), Congratz %s");
            return 1;
}
I created this to apply for admin from game, when u haves 30000 score and u typ /applyforadmin its applying for admin and accepting u as lvl 1 admin

But theres a problem When a player types the cmd it sets the level to 1 without having the needed score

Help please, thanks
Reply
#2

Код:
CMD:applyforadmin(playerid,params[])
{
            new NeededScoreAdmin;
            new CheckPlayerLevel;
            new AcceptPlayerForAdmin;
            AcceptPlayerForAdmin = playerid;
            NeededScoreAdmin = 30000;
            CheckPlayerLevel = playerid;
            if(GetPlayerScore(playerid) >= NeededScoreAdmin) {
            
            SetPlayerScore(CheckPlayerLevel, -10);
            dUserSetINT(PlayerName2(playerid)).("level",(1));
            SendClientMessage(AcceptPlayerForAdmin,red,"Accepted As Tester (Level 1), Congratz %s");
}
else {
SendClientMessage(playerid, -1, "you dont have points");
}
            return 1;
}
Reply
#3

Thanks it worked Revo
Reply
#4

Sry another help when i typ the command its makes the server offline
Reply
#5

which command? same?
Reply
#6

Quote:
Originally Posted by Anak
Посмотреть сообщение
which command? same?
Yes CMD:applyforadmin when i typs it its makes the server go offline
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)