GangZone not working -
PepeTheFrog - 12.05.2020
I am trying to create a Gang Zone (Colored black / 0x000000AA) and show it for a player but it does not show at all in radar even in the map (Gang Zone colored black will act as a road in radar).
I successfully compile the gamemode (where the gang zone create and show was included) and received no any errors and warnings.
I ran the samp-server.exe and no indicated error (I am using nativechecker plugin) even in the server_log.txt
Here's the location of the gang zone I want to place:
I've tried other colors too but it is not working.
I also tried placing the creation of gang zone and show it to a player on a filterscript but still the same.
I don't know what is not working the Creation or Show or all of it.
Here's my code:
HTML Code:
#define COLOR_BLACK 0x000000AA
new slex_part1_zone;
public OnGameModeInit()
{
SetGameModeText("SLEX 4.0");
slex_part1_zone = GangZoneCreate(2903.1584, -768.6727, 3000.0000, -800.2560);
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, slex_part1_zone, COLOR_BLACK);
return 1;
}
Re: GangZone not working -
KamilPolska - 13.05.2020
This code works...
Re: GangZone not working -
PepeTheFrog - 13.05.2020
I found the cause of the problem, it is because I am using YSF plugin. Now i need to figure out how to fix it with YSF plugin included
Re: GangZone not working -
PepeTheFrog - 13.05.2020
Is someone knows how to create gang zones using YSF plugin?
https://github.com/IllidanS4/YSF
Re: GangZone not working -
Shadow0707 - 13.05.2020
PHP Code:
#define COLOR_BLACK 0x000000AA
new slex_part1_zone;
public OnPlayerConnect(playerid)
{
SetGameModeText("SLEX 4.0");
slex_part1_zone = CreatePlayerGangZone(playerid, 2903.1584, -768.6727, 3000.0000, -800.2560);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerGangZoneShow(playerid, slex_part1_zone, COLOR_BLACK);
return 1;
}
this should do it.
EDIT: I tried your coordinates and it shows this.
PHP Code:
CreatePlayerGangZone: MaxX, MaxY must be bigger than MinX, MinY. Not inversely!
CreatePlayerGangZone: 2903.158447, -768.672729, 3000.000000, -800.255981
The error is understandable and can be easily fixed.
Re: GangZone not working -
PepeTheFrog - 13.05.2020
SOLVED!
Quote:
Originally Posted by Shadow0707
PHP Code:
#define COLOR_BLACK 0x000000AA
new slex_part1_zone;
public OnPlayerConnect(playerid)
{
SetGameModeText("SLEX 4.0");
slex_part1_zone = CreatePlayerGangZone(playerid, 2903.1584, -768.6727, 3000.0000, -800.2560);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerGangZoneShow(playerid, slex_part1_zone, COLOR_BLACK);
return 1;
}
this should do it.
EDIT: I tried your coordinates and it shows this.
PHP Code:
CreatePlayerGangZone: MaxX, MaxY must be bigger than MinX, MinY. Not inversely!
CreatePlayerGangZone: 2903.158447, -768.672729, 3000.000000, -800.255981
The error is understandable and can be easily fixed.
|
It is now working! thank you dude!

He're my snippet script code:
HTML Code:
public OnPlayerConnect(playerid)
{
slex_part1_zone = CreatePlayerGangZone(playerid, 2903.1584, -800.2560, 13618.5732, -768.6727);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayerGangZoneDestroy(playerid, slex_part1_zone);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerGangZoneShow(playerid, slex_part1_zone, COLOR_BLACK);
return 1;
}