Jump to content
  • 0
Sign in to follow this  
shinigamyusuky

does not add cash

Question

Anyone know what's the problem?

 


prontera,157,175,5 script Admin 833,{
mes .n$;
if(getgmlevel() >= 90){
mes "Painel administrador de Vip e Cash.";
if(select("- Adicionar Login:- Listar contas")==1){
while(1){
next;
mes .n$;
mes "Informe o login da conta que sera administrada: ";
input .@lac$;
ENC:
query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '"+.@lac$+"'",.@vfc;
if(.@vfc){
next;
mes .n$;
switch(select("- Adicionar Vip:- Remover Vip:- Adicionar Cash:- Remover Cash")){
case 1:
while(1){
next;
mes .n$;
mes "Quantos dias vip serão adicionados a conta [^0000FF"+.@lac$+"^000000] : ";
input .qv;
if(.qv > 0){
next;
mes .n$;
mes "Foram adicionados [^00FF00"+.qv+"^000000] dias vip a conta [^0000FF"+.@lac$+"^000000]";
query_sql "UPDATE `login` SET `dvip` = `dvip`+'"+.qv+"', `group_id` = '1' WHERE `account_id` = '"+.@vfc+"'";
close2;
attachrid(.@vfc);
if(isloggedin(.@vfc)){
dispbottom "Foram adicionados ["+.qv+"] dias vip em sua conta, relogue para evitar problemas.";
}
end;
}
}
case 2:
while(1){
next;
mes .n$;
query_sql "SELECT `dvip` FROM `login` WHERE `account_id` = '"+.@vfc+"'",.dv;
mes "A conta [^0000FF"+.@lac$+"^000000] tem [^FF0099"+.dv+"^000000] dias vip.";
mes " ";
mes "Quantos dias vip serão removidos da conta [^0000FF"+.@lac$+"^000000] : ";
input .qv;
next;
mes .n$;
if(.dv >= .qv){
mes "Foram removidos [^FF0099"+.qv+"^000000] dias vip a conta [^0000FF"+.@lac$+"^000000]";
query_sql "UPDATE `login` SET `dvip` = `dvip`-'"+.qv+"' WHERE `account_id` = '"+.@vfc+"'";
close2;
if(isloggedin(.@vfc)){
attachrid(.@vfc);
dispbottom "Foram removidos ["+.qv+"] dias vip de sua conta, você sera deslogado.";
sleep2 5000;
atcommand "@kick "+strcharinfo(0);
}
end;
}
mes "A conta conta [^0000FF"+.@lac$+"^000000] não tem dias vip suficientes para a remoção.";
if(select("- Tentar novamente:- Cancelar")==2)close;

}
case 3:
while(1){
next;
mes .n$;
mes "Quantos cash serão creditados a conta [^0000FF"+.@lac$+"^000000] : ";
input .qc;
if(.qc > 0){
next;
mes .n$;
query_sql "SELECT `account_id` FROM `acc_reg_num_db` WHERE `account_id` = '"+.@vfc+"'",.vf;
if(.vf == .@vfc){
mes "Foram adicionados [^00FF00"+.qc+"^000000] cash a conta [^0000FF"+.@lac$+"^000000].";
query_sql "UPDATE `acc_reg_num_db` SET `value` = `value`+'"+.qc+"' WHERE `account_id` = '"+.vf+"'";
close2;
if(isloggedin(.vf)){
attachrid(.vf);
dispbottom "Foram creditados ["+.qc+"] cash em sua conta, relogue para evitar problemas.";
}
end;
}
mes "Foram adicionados [^00FF00"+.qc+"^000000] cash a conta [^0000FF"+.@lac$+"^000000].";
query_sql "INSERT INTO `global_reg_value` (`char_id` ,`str` ,`value` ,`type` ,`account_id`)VALUES ('0', '#CASHPOINTS', '"+.qc+"', '2', '"+.@vfc+"')";
close2;
if(isloggedin(.@vfc)){
attachrid(.@vfc);
dispbottom "Foram creditados ["+.qc+"] cash em sua conta, relogue para evitar problemas.";
}
end;
}
}
case 4:
next;
mes .n$;
query_sql "SELECT `account_id`,`value` FROM `acc_reg_num_db` WHERE `account_id` = '"+.@vfc+"'",.vf,.vl;
if(.vf == .@vfc){
while(1){
mes "A conta [^0000FF"+.@lac$+"^000000] tem [^FF0099"+.vl+"^000000] cash.";
mes " ";
mes "Quantos cash serão debitados a conta [^0000FF"+.@lac$+"^000000] : ";
input .qc;
if(.vl >= .qc){
next;
mes .n$;
mes "Foram debitados [^FF0099"+.qc+"^000000] cash a conta [^0000FF"+.@lac$+"^000000].";
query_sql "UPDATE `global_reg_value` SET `value` = `value`-'"+.qc+"' WHERE `account_id` = '"+.vf+"'";
close2;
if(isloggedin(.vf)){
attachrid(.vf);
dispbottom "Foram debitados ["+.qc+"] cash de sua conta, você sera deslogado.";
sleep2 5000;
atcommand "@kick "+strcharinfo(0);
}
end;
}
mes " ";
mes "A conta conta [^0000FF"+.@lac$+"^000000] não tem cash suficiente para remoção.";
if(select("- Tentar novamente:- Cancelar")==2)close;
next;
mes .n$;
}
}
mes " ";
mes "[^FF0000Essa conta não contem cash.^000000]";
close;
}
}
mes " ";
mes "[^FF0000Conta não encontrada.^000000]";
}
}
query_sql "SELECT `userid`,`dvip`,`group_id`,`last_ip`,`account_id` FROM `login`",.usi$, .dv, .gid, .lip$, .vac;
deletearray .mn$;
for(set .i,0; .i < getarraysize(.usi$); set .i,.i+1) set .mn$,.mn$+"- [^FF0000"+.usi$[.i]+"^000000] [^0000FF"+.gid[.i]+"^000000] [^00AA00"+.dv[.i]+"^000000]:";
mes " ";
mes "[^FF0000< Login >^000000] - [^0000FF< Level >^000000] - [^00AA00< Dias Vip >^000000]";
select(.mn$);
for(set .i,0; .i < getarraysize(.usi$); set .i,.i+1){
if((@menu -1) == .i){
next;
set .@vfc, .vac$[.i];
set .@lac$, .usi$[.i];
mes .n$;
mes "Login: ^AA0000"+.usi$[.i];
mes "^000000Level: ^AA00CC"+.gid[.i];
mes "^000000D.Vip: ^0000AA"+.dv[.i];
mes "^000000IP: ^CC00AA"+.lip$[.i];
goto ENC;
}
}
mes " ";
mes "[^FF0000Não ah contas no servidor.^000000]";
close;
}
mes "Você tem [^BB0000"+#CASHPOINTS+"^000000] cash.";
if(select("- Comprar Vip:- Cancelar")==2)close;
while(1){
next;
mes .n$;
mes "Cada dia vip custa [^FFCCCC"+.pv+"^000000] Cash.";
mes " ";
mes "Quantos dias vip deseja comprar ?";
input .qtv;
if(#CASHPOINTS >= (.qtv*.pv)){
if(.qtv > 0){
next;
mes .n$;
mes "Você comprou [^00CC00"+.qtv+"^000000] dias vip.";
query_sql "UPDATE `login` SET `dvip` = `dvip`+'"+.qtv+"' WHERE `account_id` = '"+getcharid(3)+"'";
set #CASHPOINTS,#CASHPOINTS-(.qtv*.pv);
dispbottom "Relogue para que os dias vip possam ser creditados sem erro.";
close;
}
}
mes " ";
mes "[^FF0000Você não tem cash suficiente.^000000]";
if(select("- Tentar novamente:- Cancelar")==2)close;

}
end;
OnInit:
set .n$, "[^AA0000Gerente^000000]";
set .pv, 100;
if(!$ij){
query_sql "ALTER TABLE `login` ADD `dvip` INT NOT NULL";
set $ij,1;
}
end;
OnPCLoginEvent:
if (getgmlevel() == 1 || getgmlevel() == 0){
query_sql "SELECT `dvip` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'",.dv;
if(#CASHPOINTS > 0) dispbottom "Você tem ["+#CASHPOINTS+"] cash.";
if(.dv > 0) dispbottom "Você tem ["+.dv+"] dias vip.";
}
end;

OnClock0001: query_sql "UPDATE `login` SET `dvip`=`dvip` -1 WHERE `group_id`= 1"; end;
OnClock0002: query_sql "UPDATE `login` SET `group_id`= 0 WHERE `dvip` <= 0 AND `level`= 1"; end;
}

 

 

8SgqsAZ.png

KTB63oO.png

Edited by shinigamyusuky

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.