SA-MP Forums Archive
vip levels... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: vip levels... (/showthread.php?tid=304039)



vip levels... - vassilis - 16.12.2011

hey guys i want to start creating a base for a simple vip system using djson..
emmm a little question
how to make 3 vip levels
by defining or enum?


Re: vip levels... - eDz0r - 16.12.2011

enum


Re: vip levels... - vassilis - 16.12.2011

yes but howto use it with enum..


like that:
pawn Код:
enum VIP
{
Vip 1,
Vip 2,
Vip 3
}
new Pinfo[MAX_PLAYERS][VIP];
?


Re: vip levels... - iTorran - 16.12.2011

You could always do

pawn Код:
new IsVip[MAX_PLAYERS];

//VIP Thing
IsVip[playerid] = 1; // change to 2, 3, 4, etc for higher levels



Re: vip levels... - vassilis - 16.12.2011

nah no because i want to use it like that
if(Pinfo[playerid][VIP] <1) etc..


Re: vip levels... - Kostas' - 16.12.2011

pawn Код:
enum PlayerInfo
{
    VIP
};
new Pinfo[MAX_PLAYERS][PlayerInfo];



Re: vip levels... - vassilis - 16.12.2011

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
pawn Код:
enum PlayerInfo
{
    VIP
};
new Pinfo[MAX_PLAYERS][PlayerInfo];
hmm kai meta na kanw allo enum me to vip?


Re: vip levels... - Kostas' - 16.12.2011

oxi, mono ena kai meta
pawn Код:
CMD:setvip(playerid, params[])
{
    new id, lvl;
    // blabla...
    if(lvl > 3 || lvl < 0) return SendClientMessage(playerid, -1, "The level must be between 0 and 3");
    // Rest Of Code
    Pinfo[id][VIP] = lvl;
    return 1;
}



Re: vip levels... - Kingunit - 16.12.2011

Both talk English here. This section ain't a foreign language section.


Re: vip levels... - Kostas' - 17.12.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Both talk English here. This section ain't a foreign language section.
Sorry for this. For people didn't understand the text.
Quote:
Originally Posted by vassilis
Посмотреть сообщение
hmm kai meta na kanw allo enum me to vip?
English: Should I do another enum, with vip?

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
oxi, mono ena kai meta
pawn Код:
CMD:setvip(playerid, params[])
{
    new id, lvl;
    // blabla...
    if(lvl > 3 || lvl < 0) return SendClientMessage(playerid, -1, "The level must be between 0 and 3");
    // Rest Of Code
    Pinfo[id][VIP] = lvl;
    return 1;
}
English: No. Only one.
pawn Код:
CMD:setvip(playerid, params[])
{
    new id, lvl;
    // blabla...
    if(lvl > 3 || lvl < 0) return SendClientMessage(playerid, -1, "The level must be between 0 and 3");
    // Rest Of Code
    Pinfo[id][VIP] = lvl;
    return 1;
}