[Ajuda] Carregamento
#5

Ainda estб dando os 26 erros !


#EDIT
Vк se isto pode lhe ajuda !

pawn Код:
if(strcmp(cmd, "/abastecer", true) == 0) {
new tmp[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
new quantidade;
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "[ERRO] Use: /abastecer [litros]");
return 1;
}
quantidade = strval(tmp);
if(quantidade <= 0 || GetPlayerGrana(playerid) < quantidade){
SendClientMessage(playerid, Vermelho, "[ERRO] Vocк nгo tem dinheiro suficiente para pagar o frentista.");
return 1;
}
if(AreaPosto[playerid] == 1){ // se estiver na area
if(quantidade + dini_Int(file, "Combustivel") < 100){
dini_IntSet(file, "Combustivel", dini_Int(file, "Combustivel") + quantidade);
format(string, sizeof(string), "(INFO) Vocк completou seu tanque com %d litros de combustнvel.", quantidade);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerGrana(playerid, - quantidade);
return 1;
}
if(quantidade + dini_Int(f0D
if(quantidade + dini_Int(file, "Combustivel")){
new quantia;
quantia = 100 - dini_Int(file, "Combustivel");
dini_IntSet(file, "Combustivel", 100);
format(string, sizeof(string), "(INFO) Pronto tanque cheio foram colocados %d litros.", quantia);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerGrana(playerid, - quantia);
return 1;
}
}else{
SendClientMessage(playerid, Vermelho, "[ERRO] Vocк nгo estб no posto.");//quando nгo estiver na area
return 1;
}
}
Reply


Messages In This Thread
Carregamento - by ZaturN - 30.12.2013, 11:07
Re: Carregamento - by cantiliano - 30.12.2013, 11:37
Re: Carregamento - by ZaturN - 30.12.2013, 11:41
Re: Carregamento - by cantiliano - 30.12.2013, 11:42
Re: Carregamento - by ZaturN - 30.12.2013, 11:49
Re: Carregamento - by cantiliano - 30.12.2013, 11:50
Re: Carregamento - by ZaturN - 30.12.2013, 11:55

Forum Jump:


Users browsing this thread: 1 Guest(s)