[HELP]Script can not know if i'm VIP
#1

My Public onplayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
SetTimerEx("CheckThings",5000,1,"i",playerid);
    new cfile[100]; format(cfile,100,"ERegLog/Config/Config.ini");
    new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,MAX_PLAYER_NAME); format(file,sizeof(file),PlayerFile,Name);
    if(cInfo[SkinLoad] == 1)
    {
    SetPlayerSkin(playerid,dini_Int(file,"Skin"));
    }
    else
    {
    return 1;
    }
    if(cInfo[WantedLevelLoad] == 1)
    {
    SetPlayerWantedLevel(playerid,dini_Int(file,"Wanted Level"));
    }
    else
    {
    return 1;
    }
    if(cInfo[WeaponsLoad] == 1)
    {
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 1"),dini_Int(file,"Ammo 1"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 2"),dini_Int(file,"Ammo 2"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 3"),dini_Int(file,"Ammo 3"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 4"),dini_Int(file,"Ammo 4"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 5"),dini_Int(file,"Ammo 5"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 6"),dini_Int(file,"Ammo 6"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 7"),dini_Int(file,"Ammo 7"));
    GivePlayerWeapon(playerid,dini_Int(file,"Weapon 8"),dini_Int(file,"Ammo 8"));
    }
    else
    {
    return 1;
    }
    SetPlayerToTeamColor(playerid);
   
    if(gTeam[playerid] == TEAM_GROVE)
    {
        gTeam[playerid] = TEAM_GROVE;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are Grove.",1,1);
    }
    if(gTeam[playerid] == TEAM_COPS)
    {
        gTeam[playerid] = TEAM_COPS;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are a Cop.",1,1);
    }
    if(gTeam[playerid] == TEAM_OUTLAWS)
    {
        gTeam[playerid] = TEAM_OUTLAWS;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are OutLaw!!",1,1);
    }
    if(gTeam[playerid] == TEAM_FBI)
    {
        gTeam[playerid] = TEAM_FBI;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are FBI.",1,1);
    }
    if(gTeam[playerid] == TEAM_CRIPS)
    {
        gTeam[playerid] = TEAM_CRIPS;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are Crip's.",1,1);
    }
    if(gTeam[playerid] == TEAM_SOLDIERS)
    {
        gTeam[playerid] = TEAM_SOLDIERS;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are a Soldier.",1,1);
    }
    if(gTeam[playerid] == TEAM_BALLAS)
    {
        gTeam[playerid] = TEAM_BALLAS;
        ResetPlayerWeapons(playerid);
        GameTextForPlayer(playerid,"You are Ballas.",1,1);
    }
    if (pInfo[playerid][VipLevel] == 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTGREEN, " You are a Normal player , you don't have any privilages.");
    }
    else if (pInfo[playerid][VipLevel] == 1)
    {
        GivePlayerWeapon(playerid , 22, 20);
        GivePlayerMoney(playerid, 30);
        SendClientMessage(playerid, COLOR_GREY, "You are (VIP:Silver) you earn $30 and a colt45 with 20 ammo.");
    }
    else if (pInfo[playerid][VipLevel] == 2)
    {
        GivePlayerWeapon(playerid , 22, 50);
        GivePlayerMoney(playerid, 100);
        SendClientMessage(playerid, COLOR_YELLOW3, "You are (VIP:Gold) you earn $100 and a colt45 with 50 ammo.");
    }
    else if (pInfo[playerid][VipLevel] == 3)
    {
        GivePlayerWeapon(playerid , 25, 50);
        GivePlayerWeapon(playerid , 22, 50);
        GivePlayerMoney(playerid,GetPlayerMoney(playerid)+250);
        SendClientMessage(playerid, COLOR_GREY, "You are (VIP:Premium) you earn $250 and a colt45+shotgun with 50 ammo.");
    }
    return 1;
}
as you can see in the end of the public , VIP lvl 0 doesn't have any privilage/VIP lvl 1 win 30$ and Colt45 with 20 ammo/ VIP lvl 2..... so , i make my self VipLevel=3 and whene i go In Game it doesn't say anything , perhaps with the beginning of the Public , maybe i shall make it check that first....
i Hope You Help Me

NB: whene i complie i don't have any errors , and i defined VipLevel in my register/login system. Thank u
Reply
#2

anyone ?
Reply
#3

1 Day Ago UP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)