GangZones Help..
#1

pawn Код:
OnGameModeInit()
{
            zonagrove = GangZoneCreate(2429.166, -1729.235, 2528.039, -1634.489);
            zonaballas = GangZoneCreate(2083.108, -1748.974, 2178.178, -1630.541);
            zonavagos = GangZoneCreate(2159.164, -1152.865, 2288.461, -1010.746);
            zonalocotes = GangZoneCreate(1619.162, -2171.382, 1820.712, -2092.427);

           GangZoneShowForAll(zonagrove,0xC0C0C096);
           GangZoneShowForAll(zonaballas,0xC0C0C096);
           GangZoneShowForAll(zonavagos,0xC0C0C096);
           GangZoneShowForAll(zonalocotes,0xC0C0C096);
           return 1;

}
Why i can't see the color of zones?? this function don't works in gamemodeint(); ? the compiler don't give me erros..
Reply
#2

fixed check this
pawn Код:
OnGameModeInit()
{
            zonagrove = GangZoneCreate(2429.166, -1729.235, 2528.039, -1634.489);
            zonaballas = GangZoneCreate(2083.108, -1748.974, 2178.178, -1630.541);
            zonavagos = GangZoneCreate(2159.164, -1152.865, 2288.461, -1010.746);
            zonalocotes = GangZoneCreate(1619.162, -2171.382, 1820.712, -2092.427);
return 1;
}

public OnPlayerSpawn(playerid)
{
           GangZoneShowForAll(zonagrove,0xC0C0C096);
           GangZoneShowForAll(zonaballas,0xC0C0C096);
           GangZoneShowForAll(zonavagos,0xC0C0C096);
           GangZoneShowForAll(zonalocotes,0xC0C0C096);
return 1;
}
Reply
#3

Quote:
Originally Posted by Namer
Посмотреть сообщение
fixed check this
pawn Код:
OnGameModeInit()
{
            zonagrove = GangZoneCreate(2429.166, -1729.235, 2528.039, -1634.489);
            zonaballas = GangZoneCreate(2083.108, -1748.974, 2178.178, -1630.541);
            zonavagos = GangZoneCreate(2159.164, -1152.865, 2288.461, -1010.746);
            zonalocotes = GangZoneCreate(1619.162, -2171.382, 1820.712, -2092.427);
return 1;
}

public OnPlayerSpawn(playerid)
{
           GangZoneShowForAll(zonagrove,0xC0C0C096);
           GangZoneShowForAll(zonaballas,0xC0C0C096);
           GangZoneShowForAll(zonavagos,0xC0C0C096);
           GangZoneShowForAll(zonalocotes,0xC0C0C096);
return 1;
}
not, cuz when the player death and respawn.. if the Gangzone was been caputured and the color of it have changed
the player that has spawned, return to see it with the color assigned.. i can solve with bolean variable and istruction
if put it in on player spawn (like iszonecaptured)?
Reply
#4

then add it under onplayerConnect then

pawn Код:
public OnPlayerConnect(playerid)
{
           GangZoneShowForAll(zonagrove,0xC0C0C096);
           GangZoneShowForAll(zonaballas,0xC0C0C096);
           GangZoneShowForAll(zonavagos,0xC0C0C096);
           GangZoneShowForAll(zonalocotes,0xC0C0C096);
return 1;
}
Reply
#5

Is the same if someone that was connected before of another player that have captured the zone, he will see the zone not captured.. lol, i try with booleans.
Reply
#6

try this tutorial

https://sampforum.blast.hk/showthread.php?tid=453013
Reply
#7

Anyways thanks for your help.

(Y)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)