SA-MP Forums Archive
[Pedido] Sistema Areб Proibida - 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: [Pedido] Sistema Areб Proibida (/showthread.php?tid=605382)



Sistema Areб Proibida - Kleberson - 18.04.2016

Queria Saber se Alguйm Tem ou Sabe o Nome Desse Sistema https://*********/THevmMZ_CoU?t=560
como Vocкs Viu, Fizeram Uma Areб Proibido Para Veнculos, Quando Chega um Veiculo na Areб Proibida Ele й Respawnado , Queria Esse Sistema Para Respawnar os Players


Re: Sistema Areб Proibida - F1N4L - 18.04.2016

Para veнculos й sу criar um timer para essa funзгo e onde esta MIN.. / MAX.. vc coloca a posiзгo de uma GangZone, ou seja, uma бrea quadrada.
Se quer um veнculo em especнfico apenas altere VEHICLE_ID para o ID. Se quer vбrios, crie um loop.

Veнculos:
Код:
forward IsVehicleInRangeOfPoint(playerid);
public IsVehicleInRangeOfPoint(playerid)
{
    new Float:x,Float:y,Float:z;
    GetVehiclePos(VEHICLE_ID, x, y, z);
    if(x >= MIN_X && y >= MIN_Y && x <= MAX_X && y <= MAX_Y) SetVehicleToRespawn(VEHICLE_ID);
    return 1;
}
Players:
Код:
forward IsPlayerInRangeOfPointEx();
public IsPlayerInRangeOfPointEx()
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= MIN_X && y >= MIN_Y && x <= MAX_X && y <= MAX_Y) SpawnPlayer(playerid);
    return 1;
}