SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/05/2015, 08:35 AM   #1
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Safezone

How do they can not attack the player in safezone?
madalin912 is offline   Reply With Quote
Old 01/05/2015, 08:36 AM   #2
StreetRP
Gangsta
 
StreetRP's Avatar
 
Join Date: Apr 2013
Posts: 839
Reputation: 27
Default Re : Help

PHP Code:
SetPlayerArmour(playerid9999999);
    
SetPlayerHealth(playerid9999999); 
Look : http://forum.sa-mp.com/showthread.php?t=161639
StreetRP is offline   Reply With Quote
Old 01/05/2015, 08:38 AM   #3
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Re: Help

I want to do can not only attack in safezone , to take its weapons after receiving them back after exiting the safezone
madalin912 is offline   Reply With Quote
Old 01/05/2015, 08:39 AM   #4
FernandoLight
Huge Clucker
 
FernandoLight's Avatar
 
Join Date: Feb 2015
Location: Grove Street
Posts: 314
Reputation: 39
Default Re: Help

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.
__________________
Interested in joining a unique upcoming RP server? We're still looking for dedicated staff members so if you're interested don't hesitate to PM me!
FernandoLight is offline   Reply With Quote
Old 01/05/2015, 08:44 AM   #5
AzaMx
Huge Clucker
 
Join Date: Aug 2014
Location: Home.
Posts: 347
Reputation: 63
Default Re: Safezone

Try this, this is from my gamemode and working fine.

pawn Code:
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;
}
AzaMx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.