[Ajuda] Nгo esta identificando grana - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Nгo esta identificando grana (
/showthread.php?tid=665453)
Nгo esta identificando grana -
iAplle - 04.04.2019
Estou usando o GetPlayerMoney mas nгo esta funcionando, oque pode ser?
PHP Code:
if(!SemParar[i] && GetPlayerMoney(i) < 100) { //Quando o player tem abaixo de 100 nгo fala nada '-'
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
PassouPedagio[i] = true;
SendClientMessage(i, 0x32CD32FF, "| PEDAGIO | Vocк nгo pussui SEM PARAR e precisarб parar na cabine!");
TogglePlayerControllable(i, false);
GivePlayerMoney(i, -100);
SetTimerEx("MoveCancela1", 3000, false, "i", i);
}
}
else {
PassouPedagio[i] = true;
SetTimerEx("PassouPedagioP", 3000, false, "i", i);
SendClientMessage(i, COR_ERRO,"| ERRO | Vocк nгo possui R$100 reais para o pedбgio!");
}
Re: Nгo esta identificando grana -
Felipealves - 04.04.2019
PHP Code:
if(GetPlayerMoney(i) >= 100) { // se tiver money maior que 100
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
if(!SemParar[i]){
SendClientMessage(i, 0x32CD32FF, "| PEDAGIO | Vocк nгo pussui SEM PARAR e precisarб parar na cabine!");
}
PassouPedagio[i] = true;
TogglePlayerControllable(i, false);
GivePlayerMoney(i, -100);
SetTimerEx("MoveCancela1", 3000, false, "i", i);
break; // caso isso seja um FOR,
}
}else{ // se nгo tiver
PassouPedagio[i] = true;
SetTimerEx("PassouPedagioP", 3000, false, "i", i);
SendClientMessage(i, COR_ERRO,"| ERRO | Vocк nгo possui R$100 reais para o pedбgio!");
break; //Aqui tmb;
}
se nгo й um for retire os break.
Re: Nгo esta identificando grana -
iAplle - 04.04.2019
Funcionou valeu <3