09.12.2012, 16:50
hey guys , i have problems , i have this cmd , /setadmin /setvip /setdkz
and when i setadmin to someone , its save , but when i set vip and setdkz when player relog , only admins ranks save.
how could it happen ?
lol
and when i setadmin to someone , its save , but when i set vip and setdkz when player relog , only admins ranks save.
how could it happen ?
lol
pawn Код:
CMD:setvip(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
new id, level;
if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}/setvip (playerid/partofname) (level)");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
if(level > 1) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}Max Level is 1!");
else
{
new str[1000];
new Admin[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
GetPlayerName(playerid, Admin, sizeof(Admin));
GetPlayerName(id, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has make {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s V.I.P .", Admin, Target);
SendClientMessageToAll(lightred, str);
PlayerInfo[id][pVIP] = level;
}
}
else return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command.");
return 1;
}
CMD:setdkz(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
new id, level;
if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}/setdkz (playerid/partofname) (level)");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
if(level > 1) return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}Max Level is 0 - 1!");
else
{
new str[1000];
new Admin[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
GetPlayerName(playerid, Admin, sizeof(Admin));
GetPlayerName(id, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has set {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s to join DKZ Member rank %d.", Admin, Target, level);
SendClientMessageToAll(lightred, str);
PlayerInfo[id][pDKZ] = level;
}
}
else return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command.");
return 1;
}