not DONOR but can choose donor class
#1

i use Excel's Gamemode called COD7
i trying fix this bug,but always fail
can someone help me,please?

pawn Код:
#if VIP_SYSTEM == true
            case 9: // Class: Donor
            {
                if(IsPlayerVIPLevel(playerid,0)) return SendClientMessage(playerid,COLOR_RED -1, "YOU ARE NOT DONOR");
                SendClientMessage(playerid,COLOR_YELLOW,"[ For donor help and commands, checkout /Dhelp for more. ]");
                SetPlayerArmour(playerid,100.0);
                ResetPlayerWeapons(playerid);
                //Assault / Rifle
                GivePlayerWeapon(playerid,31,700);
                //Pistol
                GivePlayerWeapon(playerid,22,500);
                //Shotgun / Micro machinegun
                GivePlayerWeapon(playerid,26,500);
                GivePlayerWeapon(playerid,32,500);
                //Thrown
                GivePlayerWeapon(playerid,16,10);
                GivePlayerWeapon(playerid,35,5);
                //Melle
                GivePlayerWeapon(playerid,9,1);

                medicine[playerid]=5;
            }
        #endif
        }
OnplayerSpawn Code:http://pastebin.com/mXjgPj3F
Reply
#2

I am out of town with my mobile phone in my hands. Out for work!
Well you must check the IsPlayerVIPLevel(playerid,0) function from the include. Make sure the saving system works fine. Post the include part or the function code.
Reply
#3

works fine at all,just that.it is happening to you?or not?
all the codes
http://pastebin.com/9127jckE

part of it.
pawn Код:
stock IsPlayerLVIP(playerid)
{
    new name[MAX_PLAYER_NAME];
    new file[256], tmp, tmp2;
   
    GetPlayerName(playerid, name, sizeof(name));
   
    format(file,256,"/eAdmin/Accounts/%s.sav",udb_encode(name));
   
    tmp = dini_Int(file,"AccountType");
    tmp2 = dini_Int(file,"loggedin");

    if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1)) return true;
    else return false;
}

stock IsPlayerVIPLevel(playerid, level)
{
    new name[MAX_PLAYER_NAME];
    new file[256], tmp, tmp2;
   
    GetPlayerName(playerid, name, sizeof(name));
   
    format(file,256,"/eAdmin/Accounts/%s.sav",udb_encode(name));
   
    tmp = dini_Int(file,"AccountType");
    tmp2 = dini_Int(file,"loggedin");
   
    if( (IsPlayerConnected(playerid)) && (tmp >= level) && (tmp2 != 0)) return true;
    else return false;
}
}
Reply
#4

Quote:
Originally Posted by PowerF
Посмотреть сообщение
works fine at all,just that.it is happening to you?or not?
all the codes
http://pastebin.com/9127jckE

part of it.
pawn Код:
stock IsPlayerLVIP(playerid)
{
    new name[MAX_PLAYER_NAME];
    new file[256], tmp, tmp2;
   
    GetPlayerName(playerid, name, sizeof(name));
   
    format(file,256,"/eAdmin/Accounts/%s.sav",udb_encode(name));
   
    tmp = dini_Int(file,"AccountType");
    tmp2 = dini_Int(file,"loggedin");

    if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1)) return true;
    else return false;
}

stock IsPlayerVIPLevel(playerid, level)
{
    new name[MAX_PLAYER_NAME];
    new file[256], tmp, tmp2;
   
    GetPlayerName(playerid, name, sizeof(name));
   
    format(file,256,"/eAdmin/Accounts/%s.sav",udb_encode(name));
   
    tmp = dini_Int(file,"AccountType");
    tmp2 = dini_Int(file,"loggedin");
   
    if( (IsPlayerConnected(playerid)) && (tmp >= level) && (tmp2 != 0)) return true;
    else return false;
}
}
This might work:
pawn Код:
#if VIP_SYSTEM == true
            case 9: // Class: Donor
            {
                if(! IsPlayerLVIP(playerid)) return SendClientMessage(playerid,COLOR_RED -1, "YOU ARE NOT DONOR");
                SendClientMessage(playerid,COLOR_YELLOW,"[ For donor help and commands, checkout /Dhelp for more. ]");
                SetPlayerArmour(playerid,100.0);
                ResetPlayerWeapons(playerid);
                //Assault / Rifle
                GivePlayerWeapon(playerid,31,700);
                //Pistol
                GivePlayerWeapon(playerid,22,500);
                //Shotgun / Micro machinegun
                GivePlayerWeapon(playerid,26,500);
                GivePlayerWeapon(playerid,32,500);
                //Thrown
                GivePlayerWeapon(playerid,16,10);
                GivePlayerWeapon(playerid,35,5);
                //Melle
                GivePlayerWeapon(playerid,9,1);

                medicine[playerid]=5;
            }
        #endif
        }
Just replaced IsPlayerVIPLevel to IsPlayerLVIP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)