GangZone not working
#1

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;
}
Reply
#2

This code works...

Reply
#3

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
Reply
#4

Is someone knows how to create gang zones using YSF plugin? https://github.com/IllidanS4/YSF
Reply
#5

PHP Code:
#define COLOR_BLACK 0x000000AA
new slex_part1_zone;
public 
OnPlayerConnect(playerid)
{
    
SetGameModeText("SLEX 4.0");
    
slex_part1_zone CreatePlayerGangZone(playerid2903.1584, -768.67273000.0000, -800.2560);
    
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
PlayerGangZoneShow(playeridslex_part1_zoneCOLOR_BLACK);
    return 
1;

this should do it.

EDIT: I tried your coordinates and it shows this.

PHP Code:
CreatePlayerGangZoneMaxXMaxY must be bigger than MinXMinYNot inversely!
CreatePlayerGangZone2903.158447, -768.6727293000.000000, -800.255981 
The error is understandable and can be easily fixed.
Reply
#6

SOLVED!

Quote:
Originally Posted by Shadow0707
View Post
PHP Code:
#define COLOR_BLACK 0x000000AA
new slex_part1_zone;
public 
OnPlayerConnect(playerid)
{
    
SetGameModeText("SLEX 4.0");
    
slex_part1_zone CreatePlayerGangZone(playerid2903.1584, -768.67273000.0000, -800.2560);
    
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
PlayerGangZoneShow(playeridslex_part1_zoneCOLOR_BLACK);
    return 
1;

this should do it.

EDIT: I tried your coordinates and it shows this.

PHP Code:
CreatePlayerGangZoneMaxXMaxY must be bigger than MinXMinYNot inversely!
CreatePlayerGangZone2903.158447, -768.6727293000.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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)