SA-MP Forums Archive
Having a GangZoneShowForAll problem! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Having a GangZoneShowForAll problem! (/showthread.php?tid=452129)



Having a GangZoneShowForAll problem! - JimmyCh - 20.07.2013

Hey guys, so I'm hosting my script but having one problem.
I have like 5 bases, after you restart, they show perfectly, but after some time, some gang zones(the bases) start disappearing from the map, I have no idea why, although I got GangZoneShowForAll, and I have nothing that might disable it.
Can anyone help me solve this please?


Re: Having a GangZoneShowForAll problem! - Threshold - 20.07.2013

Where is GangZoneShowForAll located? I would recommend you put it under OnPlayerSpawn, or use GangZoneShowForPlayer.

Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
    GangZoneShowForAll(gangzone, color);
    return 1;
}
Or:
pawn Код:
public OnPlayerSpawn(playerid)
{
    GangZoneShowForPlayer(playerid, gangzone, color);
    return 1;
}
EDIT: Otherwise show us some of your code so we can figure out how to overcome this problem.


Re: Having a GangZoneShowForAll problem! - JimmyCh - 20.07.2013

I have them OnPlayerConnect
pawn Код:
//Areas
    UsaArea = GangZoneCreate(-1541.015625, 421.875, -1218.75, 539.0625);
    GangZoneShowForAll(UsaArea, 0x0011FF93);
    ChinaArea = GangZoneCreate(-2724.609375, -82.03125, -2566.40625, 58.59375);
    GangZoneShowForAll(ChinaArea, 0xFF780068);
    GermanyArea = GangZoneCreate(-2771.484375, 556.640625, -2496.09375, 726.5625);
    GangZoneShowForAll(GermanyArea, 0xFF0000C8);
    RussiaArea = GangZoneCreate(-1998.046875, 222.65625, -1875, 351.5625);
    GangZoneShowForAll(RussiaArea, 0xE2E200CB);
    FranceArea = GangZoneCreate(-2994.10609, 400.785855, -2834.97053, 542.239686);
    GangZoneShowForAll(FranceArea, 0x00FF0092);
I'll do like you told me and put them OnPlayerSpawn.


Re: Having a GangZoneShowForAll problem! - JaKe Elite - 20.07.2013

Sometimes this happens because of GangZone creator, You create it wrong.
Or if you didn't use a creator, You get the MinX and MinY. It sometimes happen.


Re: Having a GangZoneShowForAll problem! - JimmyCh - 20.07.2013

I added it OnPlayerSpawn, but sadly I can't test it coz my server is getting attacked by bots =_=


Re: Having a GangZoneShowForAll problem! - Threshold - 20.07.2013

Add 'rcon 0' and 'password yourpasshere' into your server.cfg file, so only you know the password and can enter, and nobody can attack your rcon whilst you're in-game.


Re: Having a GangZoneShowForAll problem! - JimmyCh - 20.07.2013

Na I had locked the server to test an anti-fake kill..
But I have a spree system so when he gave them fake kills, they got alot of score and cash.
Anw so OnPlayerSpawn should work right?


Re: Having a GangZoneShowForAll problem! - Threshold - 20.07.2013

I don't see any reason why it shouldn't, so yes. Even the wiki recommends it.


Re: Having a GangZoneShowForAll problem! - JimmyCh - 20.07.2013

Okay, thanks.. I used it.
Anw, I still need help with one problem.
Im trying to make snipers invisible on the map, bu can't make it work.
Not sure what to use, LimitPlayerMarkerRadius or something, so can anyone tell me about that?


Re: Having a GangZoneShowForAll problem! - Threshold - 20.07.2013

If you want to make them completely invisible, then you can set their colour to something but with a complete transparency value.

Red (Fully Visible): SetPlayerColor(playerid, 0xFF0000FF);
Red (Invisible On Map): SetPlayerColor(playerid, 0xFF000000);

I haven't actually experimented with these as much as I should have, but I think this should work in all honesty. Or you can always use SetPlayerMarkerForPlayer as an alternative.