VIP system help
#5

Well it already gets saved i think
pawn Код:
dcmd_setvip(playerid, params[])
{
    new file[100];
    format(file,sizeof(file),PlayerFile,Pinfo[playerid][pName]);
    new string[128],string2[128];
    new giveplayerid, level;
    new playername[MAX_PLAYER_NAME],idname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
    GetPlayerName(playerid,idname,MAX_PLAYER_NAME);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Have To Be Rcon Admin To Use This Command!");
    if(sscanf(params, "ud", giveplayerid, level))return SendClientMessage(playerid, COLOR_RED, "Usage: /setvip [Playerid/Partname] [Level]");
    else if (giveplayerid == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_RED, "Player Is Not Connected");
    else if (level > 3)return SendClientMessage(playerid, COLOR_RED, "Maximum Vip Level Is 3");
    else
    {
        Pinfo[giveplayerid][Vip_Level] = level;
        format(string,sizeof(string),"Administrator %s Set Your Vip Level To %d",playername,level);
        SendClientMessage(giveplayerid,COLOR_YELLOW,string);
        format(string2,sizeof(string2),"%s Vip Level Is Now %d",idname,level);
        SendClientMessageToAll(COLOR_YELLOW,string2);
        dini_IntSet(file,"Vip_Level",Pinfo[playerid][Vip_Level]);
    }
    return 1;
}
But it doesnt work :S
Reply


Messages In This Thread
VIP system help - by thimo - 25.03.2011, 09:32
Re: VIP system help - by thimo - 28.03.2011, 08:53
Re: VIP system help - by Mr_Scripter - 28.03.2011, 09:03
Re: VIP system help - by Haydz - 28.03.2011, 09:38
Re: VIP system help - by thimo - 29.03.2011, 06:24
Re: VIP system help - by thimo - 31.03.2011, 07:31

Forum Jump:


Users browsing this thread: 2 Guest(s)