SA-MP Forums Archive
[Ajuda] Acidente radio continua - 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] Acidente radio continua (/showthread.php?tid=366171)



Acidente radio continua - Netinho_the_killer - 05.08.2012

Quando eu estou por exemplo numa mota e vou a alta velocidade contra uma parede eu saio da mota mas o radio continua a tocar, qual й o problema?


Re: Acidente radio continua - StreetGT - 05.08.2012

porque nao cria uma variavel tipo.
new bool:PlayerOuvirMusica[MAX_PLAYERS];

quando o player seta para ouvir radio tu metes PlayerOuvirMusica[playerid] = true;

depois no OnPlayerExitVehicle
check se a variabel esta true se estiver true metes para parar o stream, percebes?

Se quiseres eu explico melhor.


Re: Acidente radio continua - zbt - 05.08.2012

if(oldstate & PLAYER_STATE_DRIVER) {
...
}


Re: Acidente radio continua - StreetGT - 05.08.2012

Quote:
Originally Posted by zbt
Посмотреть сообщение
if(oldstate & PLAYER_STATE_DRIVER) {
...
}
tambem serve.


Re: Acidente radio continua - Netinho_the_killer - 05.08.2012

Onde meto isso

if(oldstate & PLAYER_STATE_DRIVER) {
...
}


Re: Acidente radio continua - Netinho_the_killer - 05.08.2012

Alguйm?


Re: Acidente radio continua - andmeida10 - 06.08.2012

Em OnPlayerStateChange

https://sampwiki.blast.hk/wiki/OnPlayerStateChange