21.03.2012, 19:07
Hi all!
I've scripted a turf system so far, which shall provoke and end turfwars! Everything works perfect, a turfwar will start between 2 teams after 5 kills...well, the teams are messed up! I don't know why it's like this, but when a turfwar is going on, the server shows me wrong teams with wrong names! At the end, the zone is captured by a completely other team! Example:
Ballas are attacking a turf from the Aztecas!
The server is suddenly writing: The Los Santos Vagos have attacked our turf!
And at the end, the zone will get captured in another color from another team, even though the Ballas for example attacked! This is for every team the same...First of all, I've created this array, plus, that I've had all the team defines before:
Whoever will find this creepy, small solution will get a well deserved reputation point!
I've scripted a turf system so far, which shall provoke and end turfwars! Everything works perfect, a turfwar will start between 2 teams after 5 kills...well, the teams are messed up! I don't know why it's like this, but when a turfwar is going on, the server shows me wrong teams with wrong names! At the end, the zone is captured by a completely other team! Example:
Ballas are attacking a turf from the Aztecas!
The server is suddenly writing: The Los Santos Vagos have attacked our turf!
And at the end, the zone will get captured in another color from another team, even though the Ballas for example attacked! This is for every team the same...First of all, I've created this array, plus, that I've had all the team defines before:
PHP код:
#define GROVE 1
#define BALLA 2
#define VAGOS 3
#define AZTECAS 4
#define POLICE 5
#define RIFAS 6
#define LOCO 7
#define BRIGHT_GREEN 0x00FF00AA
#define TEAM_GROVE_COLOR 0x00FF007A // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0x800080AA //0xFF00FFAA Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow
#define TEAM_AZTECAS_COLOR 0x00FFFFAA //Cyan
#define TEAM_POLICE_COLOR 0x0000BBAA //Blue
#define TEAM_RIFAS_COLOR 0xFFFFFFAA //WHITE
#define TEAM_LOCO_COLOR 0x000000AA //black
PHP код:
//turfwar stuff
#define SLOTS 32 // how many slots the server got.
#define ATTACK_TIME 180000 // Three minutes.
#define ATTACK_KILLS 5 // Kills needed to start a turfwar.
#define TEAMSCORE 500 // Teamscore to take over all the opponends turf.
#define DROP_WEAPONS 1
#define DROP_LENGTH 10000 // 10 SECONDS
#define MAX_TEAMS 11
#define MAX_TURFS 21
enum teaminfo
{
TeamName[ 32 ],
TeamColor,
TurfWarsWon,
TurfWarsLost,
RivalsKilled,
HomiesDied,
TeamScore
}
new TeamInfo[ ][ teaminfo ]= {
{ "Grove Street Families", TEAM_GROVE_COLOR, 0, 0, 0, 0, 0},
{ "Ballas", TEAM_BALLA_COLOR, 0, 0, 0, 0, 0},
{ "Los Santos Vagos", TEAM_VAGOS_COLOR, 0, 0, 0, 0, 0},
{ "Los Varrios Aztecas", TEAM_AZTECAS_COLOR, 0, 0, 0, 0, 0},
{ "Police & Regime", TEAM_POLICE_COLOR, 0, 0, 0, 0, 0},
{ "San Fierro Rifas", TEAM_RIFAS_COLOR, 0, 0, 0, 0, 0},
{ "Loco Syndicato", TEAM_LOCO_COLOR, 0, 0, 0, 0, 0}
};
enum tinfo
{
turfID,
turfName[ 40 ],
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
TurfColor,
TurfOwner,
TurfAttacker,
TurfKills,
TurfAttackKills,
TurfWarStarted
}
new turfs[ MAX_TURFS ][ tinfo ] = {
{ 0, "Ganton", 2083.306884, -1757.840332, 2643.306884, -1573.840332, TEAM_GROVE_COLOR, GROVE, -1, 0, 0, 0},
{ 1, "Idlewood", 2380.865966, -2001.554565, 2644.865966, -1737.554565, TEAM_GROVE_COLOR, GROVE, -1, 0, 0, 0},
{ 2, "Ganton", 2145.166259, -1995.344848, 2385.166259, -1755.344848, TEAM_GROVE_COLOR, GROVE, -1, 0, 0, 0},
{ 3, "Glenpark", 1783.376220, -1398.963745, 2327.376220, -1030.963745, TEAM_BALLA_COLOR, BALLA, -1, 0, 0, 0},
{ 4, "Jefferson", 1564.102172, -1224.421264, 1892.102172, -1032.421264, TEAM_BALLA_COLOR, BALLA, -1, 0, 0, 0},
{ 5, "Glenpark", 1556.644531, -1398.070190, 1788.644531, -1222.070190, TEAM_BALLA_COLOR, BALLA, -1, 0, 0, 0},
{ 6, "East Los Santos", 2389.563720, -1238.908569, 2893.563720, -1046.908569, TEAM_VAGOS_COLOR, VAGOS, -1, 0, 0, 0},
{ 7, "Los Flores", 2327.079345, -1324.859741, 2391.079345, -1044.859741, TEAM_VAGOS_COLOR, VAGOS, -1, 0, 0, 0},
{ 8, "East Los Santos", 2369.286132, -1432.190307, 2705.286132, -1208.190307, TEAM_VAGOS_COLOR, VAGOS, -1, 0, 0, 0},
{ 9, "Willowfield", 1636.727661, -2174.682861, 2148.727539, -1950.682861, TEAM_AZTECAS_COLOR, AZTECAS, -1, 0, 0, 0},
{ 10, "El Corona", 1801.938842, -1965.281616, 2089.938964, -1741.281616, TEAM_AZTECAS_COLOR, AZTECAS, -1, 0, 0, 0},
{ 11, "Willowfield", 2073.393798, -2143.447021, 2409.393798, -1991.447021, TEAM_AZTECAS_COLOR, AZTECAS, -1, 0, 0, 0},
{ 12, "Commerce", 1279.003295, -1740.605834, 1831.003295, -1588.605834, TEAM_POLICE_COLOR, POLICE, -1, 0, 0, 0},
{ 13, "Idlewood", 1355.672607, -1599.537353, 1563.672607, -1007.537353, TEAM_POLICE_COLOR, POLICE, -1, 0, 0, 0},
{ 14, "Commerce", 1563.951049, -1595.397460, 1931.951049, -1499.397460, TEAM_POLICE_COLOR, POLICE, -1, 0, 0, 0},
{ 15, "Los Santos International", 1354.048217, -2387.176269, 1666.048217, -2179.176269, TEAM_RIFAS_COLOR, RIFAS, -1, 0, 0, 0},
{ 16, "Los Santos International", 1648.131103, -2333.540039, 1888.131103, -2245.540039, TEAM_RIFAS_COLOR, RIFAS, -1, 0, 0, 0},
{ 17, "Los Santos International", 1368.555419, -2624.943847, 2256.555419, -2376.943847, TEAM_RIFAS_COLOR, RIFAS, -1, 0, 0, 0},
{ 18, "Market", 1029.579833, -1608.954956, 1357.579833, -1136.954956, TEAM_LOCO_COLOR, LOCO, -1, 0, 0, 0},
{ 19, "Verona Beach", 992.831542, -1859.543090, 1288.831542, -1603.543090, TEAM_LOCO_COLOR, LOCO, -1, 0, 0, 0},
{ 20, "Market", 1286.829345, -1878.977539, 1806.829345, -1726.977539, TEAM_LOCO_COLOR, LOCO, -1, 0, 0, 0}
};
new TurfInfo[ MAX_TURFS ][ MAX_TEAMS ][ tinfo ];