07.01.2013, 04:05
How do I make my Vip level up to level 5??
enum pInfo
{
pVIP,
};
new PlayerInfo[MAX_PLAYERS+1][pInfo];
//OnPlayerCommand: /makevip add this line:
new viplevel;
if(viplevel < 0 || viplevel > 5) return SendClientMessage(playerid, COLOR_GREY, "VIP packages are between 1 and 5.");
stock VIP(playerid)
{
new name[32];
if(PlayerInfo[playerid][pVIP] == 0) format(name, sizeof(name), "None");
else if(PlayerInfo[playerid][pVIP] == 1) format(name, sizeof(name), "VIP Name");
else if(PlayerInfo[playerid][pVIP] == 2) format(name, sizeof(name), "VIP Name");
else if(PlayerInfo[playerid][pVIP] == 3) format(name, sizeof(name), "VIP Name");
else if(PlayerInfo[playerid][pVIP] == 4) format(name, sizeof(name), "VIP Name");
else if(PlayerInfo[playerid][pVIP] == 5) format(name, sizeof(name), "VIP Name");
return name;
}
CMD:setdonator(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 6) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(tmp) || isnull(tmp2) || !IsNumeric2(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setvip [playerid] [Level] | Note : Max Levels = 3 |");
new player1 = strval(tmp), skin = strval(tmp2), string[128];
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
CMDMessageToAdmins(playerid,"SETVIP");
format(string, sizeof(string), "You have set \"%s's\" VIP Level to '%d", pName(player1), skin); SendClientMessage(playerid,blue,string);
if(player1 != playerid) { format(string,sizeof(string),"Administrator \"%s\" has set your VIP Level to '%d'", pName(playerid), skin); SendClientMessage(player1,blue,string); }
return PlayerInfo[player1][dRank] = skin;
} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
enum PlayerData
{
dRank
};
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
dUserSetINT(PlayerName2(playerid)).("dRank",0);
return 1;
}