SA-MP Forums Archive
[Duvida] TUT - 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: [Duvida] TUT (/showthread.php?tid=170380)



[Duvida] TUT - blackscripter - 22.08.2010

Pessoal, ja usei search mas nao encontrei... Como e que eu posso meter um portao a abrir quando se apita com o carro num lucal?


Re: [Duvida] TUT - BlackFin - 22.08.2010

Tem que saber procurar
Portгo automatico
http://forum.sa-mp.com/showthread.ph...tao+automatico
http://forum.sa-mp.com/showthread.ph...tao+automatico


Re: [Duvida] TUT - SuB_ZeRo0_ - 22.08.2010

Na public OnPlayerKeyStateChange:

pawn Код:
if(newkeys & KEY_HORN) {
       if(IsPlayerInRangeOfPoint(playerid,Size,X,Y,Z)) {
              //se clikar na buzina e estiver em tal lugar
       }
}
E para fechar tenta usar um timer para ver se tem alguem perto, se nгo, fecha.


Re: [Duvida] TUT - blackscripter - 23.08.2010

C:\Users\Blacknedvertigo\Desktop\Server Pedro\gamemodes\stunts.pwn(517) : error 017: undefined symbol "KEY_HORN"


Re: [Duvida] TUT - BlackFin - 23.08.2010

Tem que definir KEY_HORN


Re: [Duvida] TUT - blackscripter - 23.08.2010

OBRIGADAO! Ja da..
Mas como e que eu adiciono 2 cenas?
Tipo,
Se um jogador apitar com o carro aqui , ou aqui...


Re: [Duvida] TUT - BlackFin - 23.08.2010

pawn Код:
if(newkeys & KEY_HORN) {
       if(IsPlayerInRangeOfPoint(playerid,Size,X,Y,Z)) {
              //se clikar na buzina e estiver em tal lugar
       }
}
No size determina o tamanho...
Quanto maior o size maior sera a area que se buzinar ira abrir o portгo...


Re: [Duvida] TUT - blackscripter - 23.08.2010

nao, eu quero e 2 cordenadas, por exemplo
if(IsPlayerInRangeOfPoint(playerid,Size,X,Y,Z)) {
e mais outra
if(IsPlayerInRangeOfPoint(playerid,Size,X,Y,Z)) {

Conclusгo: Se uma pessoa apitar com o carro aqui SУ neste sitio, E se for a outro sitio, que apite SУ mais ali...

Eu nao sei como meto, tenho de meter tipo && mas nao sei aonde e como meto asseguir


Re: [Duvida] TUT - Dr_Pawno - 23.08.2010

Como define uma Key??
pawn Код:
#define Key_A "A"
#define Key_B "B"
й isso??


Re: [Duvida] TUT - BlackFin - 23.08.2010

Quote:
Originally Posted by Dr_Pawno
Посмотреть сообщение
Como define uma Key??
pawn Код:
#define Key_A "A"
#define Key_B "B"
й isso??
Isso pode ajuda-lo
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/GetPlayerKeys