Safezone - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Safezone (
/showthread.php?tid=572711)
Safezone -
madalin912 - 01.05.2015
How do they can not attack the player in safezone?
Re : Help -
StreetRP - 01.05.2015
PHP код:
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
Look :
https://sampforum.blast.hk/showthread.php?tid=161639
Re: Help -
madalin912 - 01.05.2015
I want to do can not only attack in safezone , to take its weapons after receiving them back after exiting the safezone
Re: Help -
FernandoLight - 01.05.2015
I'll only give you a quick tip: Please don't make topics called "Help", it will give you a less chance of getting helped.
Re: Safezone -
AzaMx - 01.05.2015
Try this, this is from my gamemode and working fine.
pawn Код:
new Text:PeaceZone;
//put this on playerkeystatechange
if(newkeys & KEY_FIRE)
{
HideInfoBox(playerid);
if(IsInPeaceZone(playerid))
{
TDWarning(playerid, "DO NOT FIGHT IN THIS ZONE!", 2000);
SetPlayerArmedWeapon(playerid, 0);
}
}
//textdraw
PeaceZone = TextDrawCreate(471.000000,101.000000,"~r~no-shooting zone");
TextDrawAlignment(PeaceZone,0);
TextDrawBackgroundColor(PeaceZone,0xffffff33);
TextDrawFont(PeaceZone,2);
TextDrawLetterSize(PeaceZone,0.399999,1.699999);
TextDrawColor(PeaceZone,0xffffffff);
TextDrawSetOutline(PeaceZone,1);
TextDrawSetProportional(PeaceZone,1);
TextDrawSetShadow(PeaceZone,1);
//your zone
stock IsPlayerPeaceZone(playerid)
{
if(IsPlayerInAreaEx(playerid, 1285.8223, -1329.5699, 13.5506)) return 1;
return 0;
}