10.11.2016, 01:38
eae pessoal n sei oq tem de errado aq....
PHP код:
if(strcmp(cmd, "/comprarvip", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCash1] >= 50)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem moedas.");
return 1;
}
VipVaga();
if(VagaSobrando == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvip primeiro.");
return 1;
}
new level;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /comprarvip [Numero do VIP]");
SendClientMessage(playerid, COLOR_WHITE, "|____[Atenзгo vip dura apenas 1 mкs]______________");
SendClientMessage(playerid, COLOR_GRAD1, "| Vip normal Vip Premium Vip Socio");
SendClientMessage(playerid, COLOR_GRAD2, "| 50 Cash 100 Cash 175 Cash");
return 1;
}
level = strval(tmp);
if(IsPlayerConnected(playerid))
{
if(playerid != INVALID_PLAYER_ID)
{
getdate(year, month, day);
gettime(hour,minute,second);
PlayerInfo[playerid][pVIP] = level;
new var03 = 0;
new Anov,Mesv,Diav,Horav,Minutov,SegV;
getdate(Anov, Mesv, Diav);
gettime(Horav, Minutov, SegV);
if(Mesv == 12 && Anov == 2012) { Mesv = 1; Anov++;} else { Mesv++; }
new item = strval(tmp);
if (item == 1 && PlayerInfo[playerid][pCash1] >= 50)
{
new VipGrana = 5000000;
new VipNivel = 2;
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0x95FFDFAA,"**~~*~*~*~*~*~*~*|{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}| Liberaзгo de Vantagens Vips |{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}|*~*~*~*~*~*~*~~**");
PlayerInfo[playerid][pConta] += VipGrana;
PlayerInfo[playerid][pLevel] += VipNivel;
format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Seu Vip Termina Dia %d/%d/%d, Hora %d:%d:%d!", Diav,Mesv,Anov,Horav,Minutov,SegV);
SendClientMessage(playerid, 0x77EEA1FF, gstring);
SendClientMessage(playerid, 0x95FFDFAA,"** Conta Vip Normal Ativada, Obrigado por nos Ajudar, Bom Jogo!");
PlayerInfo[playerid][pCash1] -= 50;
}
else if (item == 2 && PlayerInfo[playerid][pCash1] >= 100)
{
new VipGrana = 10000000;
new VipNivel = 4;
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0x95FFDFAA,"**~~*~*~*~*~*~*~*|{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}| Liberaзгo de Vantagens Vips |{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}|*~*~*~*~*~*~*~~**");
format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pConta] += VipGrana;
PlayerInfo[playerid][pLevel] += VipNivel;
format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Seu Vip Termina Dia %d/%d/%d, Hora %d:%d:%d!", Diav,Mesv,Anov,Horav,Minutov,SegV);
SendClientMessage(playerid, 0x77EEA1FF, gstring);
SendClientMessage(playerid, 0x95FFDFAA,"** Conta Vip Premium Ativada, Obrigado por nos Ajudar, Bom Jogo!");
PlayerInfo[playerid][pCash1] -= 100;
}
else if (item == 3 && PlayerInfo[playerid][pCash1] >= 175)
{
new VipGrana = 20000000;
new VipNivel = 6;
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0x95FFDFAA,"**~~*~*~*~*~*~*~*|{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}| Liberaзгo de Vantagens Vips |{00FF00}B{FFD700}.S.{1E90FF}R{95FFDF}|*~*~*~*~*~*~*~~**");
format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pConta] += VipGrana;
PlayerInfo[playerid][pLevel] += VipNivel;
format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
format(gstring, sizeof(gstring), "** Seu Vip Termina Dia %d/%d/%d, Hora %d:%d:%d!", Diav,Mesv,Anov,Horav,Minutov,SegV);
SendClientMessage(playerid, 0x77EEA1FF, gstring);
SendClientMessage(playerid, 0x95FFDFAA,"** Conta Vip Sуcio Ativada, Obrigado por nos Ajudar, Bom Jogo!");
PlayerInfo[playerid][pCash1] -= 175;
}
ScoreLevel(playerid);
for(new i = 0; i < sizeof(VipInfo); i++)
{
if(strcmp(PlayerName(playerid),VipInfo[i][vNick],true)==0)
{
VipInfo[i][vDia] = Diav;
VipInfo[i][vMes] = Mesv;
VipInfo[i][vAno] = Anov;
VipInfo[i][vHora] = Horav;
VipInfo[i][vMinuto] = Minutov;
VipInfo[i][vSegundo] = SegV;
SaveVip();
var03 = 1;
break;
}
}
if(var03 == 0)
{
for(new i = 0; i < sizeof(VipInfo); i++)
{
if(strcmp("Ninguem",VipInfo[i][vNick],true)==0)
{
strmid(VipInfo[i][vNick], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
VipInfo[i][vDia] = Diav;
VipInfo[i][vMes] = Mesv;
VipInfo[i][vAno] = Anov;
VipInfo[i][vHora] = Horav;
VipInfo[i][vMinuto] = Minutov;
VipInfo[i][vSegundo] = SegV;
break;
}
}
}
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem Cash.");
SalvarPlayer(playerid);
SaveVip();
}
}
}
return 1;
}