09.03.2011, 02:36
/makevip cmd Works For All User. im change to admin but not work.
Fix This Please
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;
}