Posts: 7
Threads: 2
Joined: Feb 2013
Reputation:
0
Im very New to scripting pawn. and i would like to ask If its possible to make a FS that will Keep hydras/hunter/seasparrow out of spawn areas.
Ex: if i fly a hydra to spawn kill people in that area. It will bounce me out of the locations that i set.
Any help Will be good.
Posts: 7
Threads: 2
Joined: Feb 2013
Reputation:
0
I am trying to avoid anti spawn kill. Any other way that just effects ppl in air veh's like hydra and hunter?
Posts: 246
Threads: 38
Joined: May 2013
Reputation:
0
Like I said already you can avoid spawn kill by just using 1 simple timer.
Posts: 88
Threads: 22
Joined: Jul 2011
Reputation:
0
When a player spawns do:
setplayerheath etc
settimerex 60000 < 1 minute
In the timer set the hp to what was in his file
Posts: 371
Threads: 8
Joined: Aug 2012
if you are using gangzones you can use this stock function to see if the killer in zone with hydra or not
pawn Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
return 1;
}
return 0;
}
example
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInArea(killerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY) && GetVehicleModel(GetPlayerVehicleID(killerid)) == 520)
{
//killer in hydra
}
return 1;
}