[Tutorial] How to create areas not dm / Pacific
#1

Before you begin to appreciate, thanks to [L3th4l] for having guided how to create these zones and the server by the idea Camiloasc1

Before starting I recommend you download This program to be able to get the coordinates of your area.

Good start.




The parameters and functions that will use are part of "Streamer" and are as follows

pawn Код:
forward OnPlayerEnterDynamicArea(playerid, areaid);
forward OnPlayerLeaveDynamicArea(playerid, areaid);
native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
Note :can be in any wayPost Original By Incognito for see her Functions/params

We are start with the next Callback

pawn Код:
new YourZone;

public OnGameModeInit()
{
        YourZone = CreateDynamicRectangle(minx, miny, maxx, maxy, -1, -1, -1);
        return 1;
}
In this we create a Rectangle, how see in the code

Note: Change the params for yours coordinates


Now to do that when a player between to this area do Remover action against such weapons, giving, etc.


pawn Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == YourZone)
    {
      GameTextForPlayer(playerid, "You are in the area, yours arms was removed!", 4000, 3);//text in the screen of the player D:
      ResetPlayerWeapons(playerid);//this remove arms
      }
      return 1;
}
Now for when the player out of this area

pawn Код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
     if(areaid == YourZone)
    {
        GameTextForPlayer(playerid, "You're exit of the area, permitted weapons!", 4000, 3);//Text in the Screen
        //You can add more funcions how GivePlayerWeapon..
        }
    return 1;
}
This is everything xD!

Note: I don't speak very well english S: Tell me any error
Reply


Messages In This Thread
How to create areas not dm / Pacific - by Lunnatiicz - 05.03.2011, 03:46
Respuesta: How to create areas not dm / Pacific - by leaNN! - 05.03.2011, 04:20
Respuesta: How to create areas not dm / Pacific - by Lunnatiicz - 05.03.2011, 13:46
Re: How to create areas not dm / Pacific - by CBCandyBoy - 05.01.2013, 11:32
Re: How to create areas not dm / Pacific - by RedCrossER - 05.01.2013, 14:54
Re: How to create areas not dm / Pacific - by dEcooR - 23.07.2013, 10:45
Re: How to create areas not dm / Pacific - by ScRipTeRi - 24.07.2013, 02:07
Re: How to create areas not dm / Pacific - by Vin Diesel - 08.04.2017, 08:43
Re: How to create areas not dm / Pacific - by coool - 08.04.2017, 10:58
Re: How to create areas not dm / Pacific - by Astralis - 17.04.2017, 13:10

Forum Jump:


Users browsing this thread: 1 Guest(s)