new drank[16]; if(PlayerInfo[targetid][pVIP] == 0 || PlayerInfo[targetid][pSocio] == 0) { drank = "Gratis"; } else if(PlayerInfo[targetid][pVIP] == 1) { drank = "Vip Bronze"; } else if(PlayerInfo[targetid][pVIP] == 2) { drank = "Vip Prata"; } else if(PlayerInfo[targetid][pVIP] == 3) { drank = "Vнp Ouro"; } else if(PlayerInfo[targetid][pSocio] == 1) { drank = "Sуcio Bronze"; } else if(PlayerInfo[targetid][pSocio] == 2) { drank = "Sуcio Prata"; } else if(PlayerInfo[targetid][pSocio] == 3) { drank = "Sуcio Ouro"; } else if(PlayerInfo[targetid][pSocio] == 4) { drank = "Sуcio Diamante"; }
new vip[16];
new socio[16];
if( PlayerInfo[targetid][pVIP] == 0 )
vip = "Grбtis";
else if (PlayerInfo[targetid][pVIP] == 1)
vip = "Vip Bronze";
else if(PlayerInfo[targetid][pVIP] == 2)
vip = "Vip Prata";
else if( PlayerInfo[targetid][pVIP] == 3)
vip = "Vнp Ouro";
if(PlayerInfo[targetid][pSocio] == 0)
socio = "Grбtis";
else if(PlayerInfo[targetid][pSocio] == 1)
socio = "Sуcio Bronze";
else if(PlayerInfo[targetid][pSocio] == 2)
socio = "Sуcio Prata";
else if(PlayerInfo[targetid][pSocio] == 3)
socio = "Sуcio Ouro";
else if(PlayerInfo[targetid][pSocio] == 4)
socio = "Sуcio Diamante";
new str[36];
format(str, sizeof str, "VIP: %s - Sуcio: %s", vip, socio);
SendClientMessage(playerid, -1, str);
new drank[16];
switch ( PlayerInfo[targetid][pVIP] )
{
case 0: drank = "Grбtis";
case 1: drank = "Vip Bronze";
case 2: drank = "Vip Prata";
case 3: drank = "Vнp Ouro";
case 4: drank = "Sуcio Bronze";
case 5: drank = "Sуcio Prata";
case 6: drank = "Sуcio Ouro";
case 7: drank = "Sуcio Diamante";
default: drank = "Grбtis";
}
PHP код:
https://sampwiki.blast.hk/wiki/Control_Structures#switch Ao meu ver ficaria melhor assim: PHP код:
Beijos! |
Provavelmente nгo esta setando os Rankings do vip, ou nгo esta chamando no /rg dб forma correta.
|
stock IsPlayerVIP(playerid)
{
new vip[40];
if(PlayerInfo[targetid][pVIP] < 1 ) vip = "Grбtis";
else if(PlayerInfo[targetid][pVIP] >= 1 && PlayerInfo[targetid][pVIP] < 2) vip = "VIP Bronze";
else if(PlayerInfo[targetid][pVIP] >= 2 && PlayerInfo[targetid][pVIP] < 3) vip = "VIP Prata";
else if(PlayerInfo[targetid][pVIP] >= 3 ) vip = "VIP Ouro";
return vip;
}
stock IsPlayerSocio(playerid)
{
new socio[40];
if(PlayerInfo[targetid][pSocio] < 1 ) socio = "Grбtis";
else if(PlayerInfo[targetid][pSocio] >= 1 && PlayerInfo[targetid][pSocio] < 2) sуcio = "Sуcio Bronze";
else if(PlayerInfo[targetid][pSocio] >= 2 && PlayerInfo[targetid][pSocio] < 3) sуcio = "Sуcio Prata";
else if(PlayerInfo[targetid][pSocio] >= 3 && PlayerInfo[targetid][pSocio] < 4) socio = "Sуcio Ouro";
else if(PlayerInfo[targetid][pSocio] >= 4 ) socio = "Sуcio Diamante";
return socio;
}
//No seu comando /RG
IsPlayerVIP(playerid)
IsPlayerSocio(playerid)
format(gstring, sizeof(gstring), "Level[%d] Sexo[%s] Conta[%s] Dinheiro[%d] Banco[%d] Casamento[%s] Horas Jogadas[%d] Cidade[%s]",level, atext,drank, cash, Conta, married, ptime,cidtext); SendClientMessage(playerid, COR_RG,gstring); |