Dm Zone immunity
#1

Hello , Im wondering , how to make the Spawn area , immunity for players from vehicles and weapons ? for example if vehicle come to spawn area just shoot it away and no one can attack in the plac
Reply
#2

Well you can do this IsPlayerInRangeOfPoint That will probably be the best thing to do.
Reply
#3

Quote:
Originally Posted by SwisherSweet
Посмотреть сообщение
Well you can do this IsPlayerInRangeOfPoint That will probably be the best thing to do.
Thanks , so can i put like that , but i dont know how to push a player out of spawn zone
Код:
if(IsPlayerInVehicle(playerid, vehid))
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
    {
    GameTextForPlayer(playerid, "~R~Stay Away from Spawn Zone",3000, 3);
   //What the code which push the player out of SpawnZone
   ResetPlayerWeapons(playerid);
    }
}
Reply
#4

Do you wanna push the player away or maybe a slap out of the vehicle?
If you wanna slap him out of the vehicle you can do this.

pawn Код:
if(IsPlayerInVehicle(playerid, vehid))
{
    new Float:PlayerPosition[3];
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
    {
        GameTextForPlayer(playerid, "~R~Stay Away from Spawn Zone",3000, 3);
        GetPlayerPos(playerid, PlayerPosition[0], PlayerPosition[1], PlayerPosition[2]);
        SetPlayerPos(playerid, PlayerPosition[0], PlayerPosition[1], PlayerPosition[2] + 5);
        ResetPlayerWeapons(playerid);
    }
}
Reply
#5

Mmmmmm no no just reset weapons and puch his car out of range
Reply
#6

Ok I have never done something like this so i don't know for sure, Tell me if it dosen't work...
pawn Код:
if(IsPlayerInVehicle(playerid, vehid))
{
    new Float:VehiclePosition[3];
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
    {
        GameTextForPlayer(playerid, "~R~Stay Away from Spawn Zone",3000, 3);
        GetVehiclePos(playerid, VehiclePosition[0], VehiclePosition[1], VehiclePosition[2]);
        SetVehiclePos(playerid, VehiclePosition[0], VehiclePosition[1] -5, VehiclePosition[2]);
        ResetPlayerWeapons(playerid);
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)