small help
#1

/makevip cmd Works For All User. im change to admin but not work.
Fix This Please
pawn Код:
if(strcmp(cmd, "/makevip", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] > 100002)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "   You are not Authorized to use that Command !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makevip [PlayerID/PartOfName]");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        if(giveplayerid == INVALID_PLAYER_ID)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Invalid Player/ID.");
            return 1;
        }
        if(PlayerInfo[giveplayerid][pDonateRank] == 0)
        {
            PlayerInfo[giveplayerid][pDonateRank] = 1;
            format(string, sizeof(string), "AdmCmd: %s Was Given VIP Status by %s.",PlayerName(giveplayerid),PlayerName(playerid));
            ABroadCast(COLOR_LIGHTRED,string,1);
            format(string, sizeof(string), "* Admin %s Has Gave You VIP Status.", PlayerName(playerid));
            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
        }
        else
        {
            PlayerInfo[giveplayerid][pDonateRank] = 0;
            format(string, sizeof(string), "AdmCmd: %s's VIP Status Has Been Revoked by %s.",PlayerName(giveplayerid),PlayerName(playerid));
            ABroadCast(COLOR_LIGHTRED,string,1);
            format(string, sizeof(string), "* Admin %s Has Revoked You Of Your VIP Status.", PlayerName(playerid));
            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
        }
        return 1;
    }
Reply
#2

Quote:
Originally Posted by YungGee
Посмотреть сообщение
it will only work for a admin that is more then 100002

pawn Код:
if(PlayerInfo[playerid][pAdmin] > 100002)

try..

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 1)
Checks if there not a admin..


EDIT:


< 1
Please Read Post Fully Then Reply Don't spam..

Quote:
Originally Posted by venice
Посмотреть сообщение
/makevip cmd Works For All User. im change to admin but not work.
Fix This Please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)