1 - lucas_mdr1235, vocк colocou a funзгo ProxDetectorS, algo que nгo й original do PAWNO, entгo segue aqui:
pawn Код:
//NO TOPO DO GAMEMODE, PONHA ISTO:
forward ProxDetectorS(Float:radi, playerid, targetid);
//NO FINAL DO GM, PONHA ISTO:
public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
GetPlayerPos(targetid, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
Explicando:
- O "Float:radi" й o raio de alcance da mensgem, entгo se vocк colocar 10, todos que estiverem a 10 m (metro й uma suposiзгo, pois o GTA SA:MP nгo usa o sistema mйtrico, isto serve sу como exemplo) receberгo a mensagem.
- "playerid" e "targetid" deve ser substituнdo pelos jogadores que vocк quer comparar a distancia (Float:radi).
2 - OutWorld, vocк quer que o criminoso seja movido pelo sistema atras do policial ? Ou vocк quer somente que ele seja congelado ?