05.03.2011, 03:46
(
Последний раз редактировалось Lunnatiicz; 05.03.2011 в 13:47.
)
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
Note :can be in any wayPost Original By Incognito for see her Functions/params
We are start with the next Callback
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.
Now for when the player out of this area
This is everything xD!
Note: I don't speak very well english S: Tell me any error
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);
We are start with the next Callback
pawn Код:
new YourZone;
public OnGameModeInit()
{
YourZone = CreateDynamicRectangle(minx, miny, maxx, maxy, -1, -1, -1);
return 1;
}
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;
}
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;
}
Note: I don't speak very well english S: Tell me any error