SA-MP Forums Archive
Problem with gang zones - 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: Problem with gang zones (/showthread.php?tid=358765)



Problem with gang zones - Scrillex - 11.07.2012

Код:
//Gangzones
new Ballas;
new Cripz;
new Vagos;
new Varios;
Код:
       //GangZones
	Ballas = GangZoneCreate(1092.441894, 2431.863769, 2116.441894, 2887.863769); //this line
	Cripz = GangZoneCreate(865.718933, 1832.264282, 1193.718994, 2488.264160); 
	Vagos = GangZoneCreate(1308.598876, 556.806396, 1836.598876, 1132.806396); //this line
	Varios = GangZoneCreate(2136.748046, 1941.612792, 2864.748046, 2589.612792); //this line
Код:
public OnPlayerSpawn(playerid)
{
    GangZoneShowForPlayer(playerid, Varios, 65477);
    GangZoneShowForPlayer(playerid, Vagos, -65332);
    GangZoneShowForPlayer(playerid, Cripz, 1538909898);
    GangZoneShowForPlayer(playerid, Ballas, -2147418167);
    return 1;
}
Umm and here are errors...

Код:
error 022: must be lvalue (non-constant)
error 022: must be lvalue (non-constant)
error 022: must be lvalue (non-constant)
warning 203: symbol is never used: "Ballas" 
warning 203: symbol is never used: "Vagos"
warning 203: symbol is never used: "Varios"



Re: Problem with gang zones - clarencecuzz - 11.07.2012

You must use color codes.
pawn Код:
GangZoneShowForPlayer(playerid, zone, color);
As you can see, 65477, -65332, -2147418167 are not color codes.
https://sampwiki.blast.hk/wiki/Colors_List

EDIT: Example:
pawn Код:
GangZoneShowForPlayer(playerid, Ballas, 0x00FF00AA);
Will show a gang zone called "Ballas" as the color GREEN (0x00FF00AA).


Re: Problem with gang zones - Scrillex - 11.07.2012

Umm you see
Quote:

GangZoneShowForPlayer(playerid, Varios, 65477);
GangZoneShowForPlayer(playerid, Vagos, -65332);
GangZoneShowForPlayer(playerid, Cripz, 153890989;
GangZoneShowForPlayer(playerid, Ballas, -2147418167);

There is everything what is needed... because its Ryders fs.. not self made + The errors are different not colors....


Re: Problem with gang zones - MP2 - 11.07.2012

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
You must use color codes.
pawn Код:
GangZoneShowForPlayer(playerid, zone, color);
As you can see, 65477, -65332, -2147418167 are not color codes.
https://sampwiki.blast.hk/wiki/Colors_List

EDIT: Example:
pawn Код:
GangZoneShowForPlayer(playerid, Ballas, 0x00FF00AA);
Will show a gang zone called "Ballas" as the color GREEN (0x00FF00AA).
You're wrong. You can use integers.

What lines are the errors on?


Re: Problem with gang zones - clarencecuzz - 11.07.2012

Ah I see, sorry, I didn't see which lines the errors were on. I just assumed that was the reason -__-


Re: Problem with gang zones - Scrillex - 11.07.2012

here
Quote:

Vagos = GangZoneCreate(1308.598876, 556.806396, 1836.598876, 1132.806396); //this line
Varios = GangZoneCreate(2136.748046, 1941.612792, 2864.748046, 2589.612792); //this line
Ballas = GangZoneCreate(1092.441894, 2431.863769, 2116.441894, 2887.863769); //this line

Quote:

error 022: must be lvalue (non-constant)
error 022: must be lvalue (non-constant)
error 022: must be lvalue (non-constant)