#8

I need help again.
I can't set my HG rank

This is my code >
PHP код:
new PlayerInfo[MAX_PLAYERS][pInfo];
enum vInfo
{
    
modding,
    
model,
    
Float:x_spawn,
    
Float:y_spawn,
    
Float:z_spawn,
    
Float:za_spawn,
    
Float:ox_spawn,
    
Float:oy_spawn,
    
Float:oz_spawn,
    
Float:oza_spawn,
    
color_1,
    
color_2,
    
owner[128],
    
vehiclecost,
    
bought,
    
secure,
    
asecure,
    
vused,
    
buybar,
    
name[128],
    
mod1,
    
mod2,
    
mod3,
    
mod4,
    
mod5,
    
mod6,
    
mod7,
    
mod8,
    
mod9,
    
mod10,
    
mod11,
    
mod12,
    
mod13,
    
mod14,
    
mod15,
    
mod16,
    
mod17,
    
paintjob,
    
Temp,

PHP код:
enum ServerData
{
    
MaxPing,
    
ReadPMs,
    
ReadCmds,
    
MaxAdminLevel,
    
MaxHGRank,
    
AdminOnlySkins,
    
AdminSkin,
    
AdminSkin2,
    
NameKick,
    
PartNameKick,
    
AntiBot,
    
AntiSpam,
     
AntiSwear,
     
NoCaps,
    
Locked,
    
Password[128],
    
GiveWeap,
    
GiveMoney,
    
ConnectMessages,
    
AdminCmdMsg,
    
AutoLogin,
    
MaxMuteWarnings,
    
DisableChat,
    
MustLogin,
    
MustRegister,
};
new 
ServerInfo[ServerData]; 
PHP код:
CMD:sethg(playerid,params[]) {
    if(
PlayerInfo[playerid][LoggedIn] == 1) {
        if(
PlayerInfo[playerid][HGRank] >= || IsPlayerAdmin(playerid)) {
            new 
tmp[128], tmp2[128], Index;        tmp strtok(params,Index), tmp2 strtok(params,Index);
            if(
isnull(params)) return SendClientMessage(playeridred"USAGE: /sethg [playerid] [Rank]");
            new 
player1levelplayername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            
player1 strval(tmp);
            if(
isnull(tmp2)) return SendClientMessage(playeridred"USAGE: /sethg [playerid] [Rank]");
            
level strval(tmp2);
            if(
IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
                if(
PlayerInfo[player1][LoggedIn] == 1) {
                    if(
level ServerInfo[MaxHGRank] ) return SendClientMessage(playerid,red,"ERROR: Incorrect Rank");
                    if(
level == PlayerInfo[player1][HGRank]) return SendClientMessage(playerid,red,"ERROR: Player is already this Rank");
                       
CMDMessageToAdmins(playerid,"SETHG");
                    
GetPlayerName(player1playernamesizeof(playername));    GetPlayerName(playeridadminnamesizeof(adminname));
                       new 
year,month,day;   getdate(yearmonthday); new hour,minute,secondgettime(hour,minute,second);
                    if(
level 0format(string,sizeof(string),"Administrator %s has set you to [HG] Member Status [Rank %d]",adminnamelevel);
                    else 
format(string,sizeof(string),"Administrator %s has set you to [HG] Member Status [Rank %d]",adminnamelevel);
                    
SendClientMessage(player1,blue,string);
                    if(
level PlayerInfo[player1][HGRank]) GameTextForPlayer(player1,"HG Rank Promoted"20003);
                    else 
GameTextForPlayer(player1,"HG Rank Demoted"20003);
                    
format(string,sizeof(string),"You have made %s [HG] Rank %d on %d/%d/%d at %d:%d:%d"playernameleveldaymonthyearhourminutesecond); SendClientMessage(playerid,blue,string);
                    
dUserSetINT(PlayerName2(player1)).("level",(level));
                    
PlayerInfo[player1][HGRank] = HGRank;
                    return 
PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                } else return 
SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be [HG] Member");
            } else return 
SendClientMessage(playeridred"Player is not connected");
        } else return 
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    } else return 
SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");

And this is my ladmin\config >
Код HTML:
MaxPing=999999999ms
ReadPMs=1
ReadCmds=1
MaxAdminLevel=8
MaxHGRank=10
AdminOnlySkins=0
AdminSkin=217
AdminSkin2=214
AntiBot=1
AntiSpam=1
AntiSwear=1
NameKick=1
PartNameKick=1
NoCaps=0
Locked=0
SaveWeap=1
SaveMoney=1
ConnectMessages=1
AdminCmdMessages=1
AutoLogin=0
MaxMuteWarnings=4
MustLogin=0
MustRegister=0
Please help me to fix it.
Thanks
Reply


Messages In This Thread
Help - by Filbert - 04.06.2016, 23:30
Re: Help - by Dayrion - 05.06.2016, 00:38
Re: Help - by iShawn - 05.06.2016, 00:53
Re: Help - by WhiteGhost - 05.06.2016, 00:55
Re: Help - by iShawn - 05.06.2016, 00:57
Re: Help - by Filbert - 05.06.2016, 01:25
Re: Help - by Sew_Sumi - 05.06.2016, 01:25
Re: Help - by Filbert - 05.06.2016, 01:35
Re: Help - by Sew_Sumi - 05.06.2016, 02:48

Forum Jump:


Users browsing this thread: 1 Guest(s)