SA-MP Forums Archive
[AJUDA] GangZone - 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] GangZone (/showthread.php?tid=290687)



[AJUDA] GangZone - rafinha.faria - 16.10.2011

Primeiro queria pedir desculpa por estб novamente aki enchendo o saco..
Mais gostaria de uma ajuda, queria algo assim:
o player entra na gangzone ~> recupera life e aparece uma mensagem(um textdraw)
o player sai da gangzone ~> para de receber life e some o textdraw.

tudo isso automaticamente, sem comando, apenas entrando e saindo da gz. mais eu nao consigo faze =(

se alguem pudesse me ajuda ficarei grato..


Re: [AJUDA] GangZone - Dolby - 16.10.2011

Faz um SetTimer quando o player conectar com valor true,para verificar se o player esta em determinada coordenada,caso esteja execute tais funзoes.


Re: [AJUDA] GangZone - rafinha.faria - 16.10.2011

entao foi q eu tentei faze. Mais tipo assim, nao dava erro no pawn. mas no jogo nao acontecia nada =(


Re: [AJUDA] GangZone - rafinha.faria - 16.10.2011

pera. me explica direito isso. como assim com valor true? pra ficar repetindo.


Re: [AJUDA] GangZone - Dolby - 16.10.2011

pawn Код:
SetTimerEx("GangZone",2000,true,"d",playerid);
//
forward GangZone(playerid);
public GangZone(playerid)
{
if(PlayerInGangZone(playerid))
{
...
return 1;
}
return 1;
}
stock PlayerInGangZone(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(x == 1000 && y == 1000) return 1;
return 1;
}
Exemplo..Se tiver na Posiзao X = 1000 e Y = 1000,retornara true.


Re: [AJUDA] GangZone - rafinha.faria - 16.10.2011

Nossa Valeu Gustavo. Vou testa aki.

------

Valeu Gustavo. Axo q era isso mesmo..
Muito Obirgado lek