No air veh's at spawn. -
Snakekeeper - 11.06.2013
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.
Re: No air veh's at spawn. -
RALL0 - 11.06.2013
It would be easier to protect the players from spawn killing by using a timer, this can be useful for beginners:
https://sampwiki.blast.hk/wiki/SetTimerEx
Re: No air veh's at spawn. -
Snakekeeper - 11.06.2013
I am trying to avoid anti spawn kill. Any other way that just effects ppl in air veh's like hydra and hunter?
Re: No air veh's at spawn. -
RALL0 - 11.06.2013
Like I said already you can avoid spawn kill by just using 1 simple timer.
Re: No air veh's at spawn. -
Snakekeeper - 12.06.2013
Quote:
Originally Posted by RALL0
Like I said already you can avoid spawn kill by just using 1 simple timer.
|
Quote:
Originally Posted by Snakekeeper
I am trying to avoid anti spawn kill.
|
People can kill ppl at the spawn just not with Hydras etc...
A timer to keep health from decreasing at spawn time doesn't help me there.
Ill just keep researching.
Re: No air veh's at spawn. -
kaisersouse - 12.06.2013
https://sampwiki.blast.hk/wiki/GangZoneCreate
I use GangZones to create "safe zones" at spawn. Can't use heavy weapons (RPG, minigun) within the zone, and can't enter w/ tank/hydra/hunter.
As soon as someone enters a safezone in a hydra/hunter....they just blow up haha
Re: No air veh's at spawn. -
Slaykler - 12.06.2013
When a player spawns do:
setplayerheath etc
settimerex 60000 < 1 minute
In the timer set the hp to what was in his file
Re: No air veh's at spawn. -
Snakekeeper - 12.06.2013
Quote:
Originally Posted by kaisersouse
https://sampwiki.blast.hk/wiki/GangZoneCreate
I use GangZones to create "safe zones" at spawn. Can't use heavy weapons (RPG, minigun) within the zone, and can't enter w/ tank/hydra/hunter.
As soon as someone enters a safezone in a hydra/hunter....they just blow up haha
|
Perfect. Ty
Also. Like i said im new. I can make the zone with that link. But how do i add where hydra enters its blows up?
Re: No air veh's at spawn. -
DaTa[X] - 12.06.2013
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;
}
AW: Re: No air veh's at spawn. -
HurtLocker - 12.06.2013
Quote:
Originally Posted by kaisersouse
https://sampwiki.blast.hk/wiki/GangZoneCreate
I use GangZones to create "safe zones" at spawn. Can't use heavy weapons (RPG, minigun) within the zone, and can't enter w/ tank/hydra/hunter.
As soon as someone enters a safezone in a hydra/hunter....they just blow up haha
|
How do you detect if somebody entered the zone?