#1

How to get rid of this error?

Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(116) : error 017: undefined symbol "VehicleInfo"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(116) : warning 215: expression has no effect
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(116) : error 001: expected token: ";", but found "]"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(116) : error 029: invalid expression, assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(116) : fatal error 107: too many error messages on one lin
pawn Код:
if(VehicleInfo[vehicleid][Temp] == 1) SetTimerEx("EraseVehicle", 5000,0,"i",vehicleid);
Reply
#2

U haven't defined the "VehicleInfo"
pawn Код:
New VehicleInfo[MAX_VEHICLES][];
Reply
#3

pawn Код:
new VehicleInfo[MAX_VEHICLES][];
pawn Код:
if(VehicleInfo[vehicleid][Temp] == 1) SetTimerEx("EraseVehicle", 5000,0,"i",vehicleid);
    if(onsys[vehicleid] == 1) SetTimerEx("EraseVehicle",10000,0,"i",vehicleid);
Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(101) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(117) : error 017: undefined symbol "Temp"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(118) : error 017: undefined symbol "onsys"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(118) : warning 215: expression has no effect
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(118) : error 001: expected token: ";", but found "]"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(118) : error 029: invalid expression, assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(118) : fatal error 107: too many error messages on one line
Reply
#4

Look the code I given u will not work as u need to fill it In!
The second variable is missing which you need to check yourself.
Reply
#5

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
Look the code I given u will not work as u need to fill it In!
The second variable is missing which you need to check yourself.
Great that you mentioned that in your first post as well! It was really clear in that one!

@OP: Create an enum with all vehicleinfo that you need and then create a variable out of that enum. For instance:

pawn Код:
enum vInf = { // not even sure if the equals-sign needs to be there
 vId,
 vCol1,
 vCol2
};

new VehicleInfo[MAX_VEHICLES][vInf];

// you can now call a variable like this:
VehicleInfo[vehicleid][vCol1];
Reply
#6

argh Is this serious?

I just get errors!!!

I want to put it in the gamemode

Код:
//----------------------------------------------------------
//
//  GRAND LARCENY  1.0
//  A freeroam gamemode for SA-MP 0.3
//
//----------------------------------------------------------

#include <irc>
#include <a_samp>
#include <core>
#include <ircfs>
#include <float>
#include <YSI\y_ini>
#include <streamer>
#include <sscanf2>
#include <ZCMD> //Like so!
#include <DynamicRadioStations>
#include "../include/gl_common.inc"
#include "../include/gl_spawns.inc"

#pragma tabsize 0

//----------------------------------------------------------

#define COLOR_WHITE         0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777

#define CITY_LOS_SANTOS     0
#define CITY_SAN_FIERRO     1
#define CITY_LAS_VENTURAS   2
#define Skinid 1
#define Money 2
#define Faction 3
#define irc
#define STREAMER_TYPE_OBJECT (0)
#define STREAMER_TYPE_PICKUP (1)
#define STREAMER_TYPE_CP (2)
#define STREAMER_TYPE_RACE_CP (3)
#define STREAMER_TYPE_MAP_ICON (4)
#define STREAMER_TYPE_3D_TEXT_LABEL (5)
#define STREAMER_TYPE_AREA (6)

#define STREAMER_AREA_TYPE_CIRCLE (0)
#define STREAMER_AREA_TYPE_RECTANGLE (1)
#define STREAMER_AREA_TYPE_SPHERE (2)
#define STREAMER_AREA_TYPE_CUBE (3)
#define STREAMER_AREA_TYPE_POLYGON (4)

#define STREAMER_OBJECT_TYPE_GLOBAL (0)
#define STREAMER_OBJECT_TYPE_PLAYER (1)
#define STREAMER_OBJECT_TYPE_DYNAMIC (2)


#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"

// Name that everyone will see
#define BOT_1_NICKNAME "Julius95Bot"
// Name that will only be visible in a whois
#define BOT_1_REALNAME "Julius95Bot"
// Name that will be in front of the hostname (username@hostname)
#define BOT_1_USERNAME "Julius95Bot"

#define BOT_2_NICKNAME "AdrenalineBot"
#define BOT_2_REALNAME "AdrenalineBot"
#define BOT_2_USERNAME "AdrenalineBot"

#define IRC_SERVER "irc.geekshed.net"
#define IRC_PORT (6667)
#define IRC_CHANNEL "#Julius95"

// If your bot names are registered put a password here to identify them with
#define IRC_PASSWORD "password"
#define IRC_PASSWORD "password"

// Maximum number of bots in the filterscript
#define MAX_BOTS (2)

#define PLUGIN_VERSION "1.4.3"



new total_vehicles_from_files=0;

new botIDs[MAX_BOTS], groupID;

// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new gPlayerHasCitySelected[MAX_PLAYERS];
new gPlayerLastCitySelectionTick[MAX_PLAYERS];



new Text:txtClassSelHelper;
new Text:txtLosSantos;
new Text:txtSanFierro;
new Text:txtLasVenturas;

new thisanimid=0;
new lastanimid=0;

enum vInf = { // not even sure if the equals-sign needs to be there
 vId,
 vCol1,
 vCol2
};

new VehicleInfo[MAX_VEHICLES][vInf];

// you can now call a variable like this:
VehicleInfo[vehicleid][vCol1];

new VehicleInfo[MAX_VEHICLES][];


//----------------------------------------------------------

main()
{
    print("\n---------------------------------------");
    print("Running Julius95's server\n");
    print("---------------------------------------\n");
}

//----------------------------------------------------------

public OnVehicleDeath(vehicleid,killerid)
{
	if(VehicleInfo[vehicleid][Temp] == 1) SetTimerEx("EraseVehicle", 5000,0,"i",vehicleid);
	if(onsys[vehicleid] == 1) SetTimerEx("EraseVehicle",10000,0,"i",vehicleid);
    SandInEngine[vehicleid] =0;

    for (new i = 0; i < MAX_PLAYERS; i++) {
    if (IsPlayerInVehicle(i, vehicleid)) {
    new Float:vHealth;
    GetVehicleHealth(vehicleid, vHealth);
    if (PlayerInfo[i][Autofix] == 1 && vHealth =< 250) {
    RepairVehicle(vehicleid);
	return 1;
}

//----------------------------------------------------------

COMMAND:announce(playerid, params[])
{
        
        
        if(sscanf(params,"si", params[0],params[1])) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Announce "WHITE"[Text] [Style 1-6]");
        if(params[1]>6||params[1]<0) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Ann "WHITE"[Text] [Style 1-6]");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i)) GameTextForPlayer(i, params[0], 5000, params[1]);
        }
        return 1;
}

//----------------------------------------------------------

CMD:autofix(playerid,params[]) {
        SendClientMessage(playerid,green,"Autofix is enable.");
	#pragma unused params
    	if(PlayerInfo[playerid][Autofix] == 0)	{
                SendClientMessage(playerid,green,"Player has autofix disabled.");
   	    	PlayerInfo[playerid][Autofix] = 1;
           	SendClientMessage(playerid,green,"Vehicle Auto-Fix Enabled. Do NOT use in fight.");
		} else {
                SendClientMessage(playerid,green,"Player has autofix enabled.");
   	        PlayerInfo[playerid][Autofix] = 0;
		} return SendClientMessage(playerid,red,"Vehicle Auto-Fix Disabled");
}

//----------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{

  if(strcmp(cmdtext, "/flip", true) == 0)
  {
  if(IsPlayerInAnyVehicle(playerid))
  {
    new currentveh;
    new Float:angle;
    currentveh = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(currentveh, angle);
    SetVehicleZAngle(currentveh, angle);
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: Your vehicle has been flipped.");
    return 1;
  }
  else
  {
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: You are not in any vehicle!");
    return 1;
  }
  }
   return 0;
}

//----------------------------------------------------------

public OnPlayerPrivmsg(playerid, recieverid, text[])
{

    	new string[64],playername[MAX_PLAYER_NAME],recievername[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername, sizeof(playername));
		GetPlayerName(recieverid, recievername, sizeof(recievername));
		format(string, sizeof(string), "PM from %s To %s: %s", playername,recievername, text);
		for (new a = 0; a < MAX_PLAYERS; a++)
		SendClientMessage(a, COLOR_WHITE, string);
	}
//----------------------------------------------------------

public OnPlayerDisconnect(playerid, reason)
{
        new leaveMsg[128], name[MAX_PLAYER_NAME], reasonMsg[8];
        switch(reason)
        {
                case 0: reasonMsg = "Timeout";
                case 1: reasonMsg = "Leaving";
                case 2: reasonMsg = "Kicked";
        }
        GetPlayerName(playerid, name, sizeof(name));
        format(leaveMsg, sizeof(leaveMsg), "02[%d] 03*** %s has left the server. (%s)", playerid, name, reasonMsg);
        IRC_GroupSay(groupID, IRC_CHANNEL, leaveMsg);
        return 1;
}

//----------------------------------------------------------

public OnPlayerConnect(playerid)
{

		new joinMsg[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s has joined the server.", playerid, name);
        IRC_GroupSay(groupID, IRC_CHANNEL, joinMsg);
        

	GameTextForPlayer(playerid,"~w~Julius95's Free Mode",3000,4);
    SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}J{FFFFFF}ulius's {88AA88}ser{FFFFFF}ver");

    // class selection init vars
    gPlayerCitySelection[playerid] = -1;
    gPlayerHasCitySelected[playerid] = 0;
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();

    //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);

    /*
    Removes vending machines
    RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
    */

    /*
    new ClientVersion[32];
    GetPlayerVersion(playerid, ClientVersion, 32);
    printf("Player %d reports client version: %s", playerid, ClientVersion);*/

    return 1;
}

//----------------------------------------------------------

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;

    new randSpawn = 0;

    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, 30000);

    if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_LosSantos));
        SetPlayerPos(playerid,
         gRandomSpawns_LosSantos[randSpawn][0],
         gRandomSpawns_LosSantos[randSpawn][1],
         gRandomSpawns_LosSantos[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
    }
    else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_SanFierro));
        SetPlayerPos(playerid,
         gRandomSpawns_SanFierro[randSpawn][0],
         gRandomSpawns_SanFierro[randSpawn][1],
         gRandomSpawns_SanFierro[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
    }
    else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
        SetPlayerPos(playerid,
         gRandomSpawns_LasVenturas[randSpawn][0],
         gRandomSpawns_LasVenturas[randSpawn][1],
         gRandomSpawns_LasVenturas[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
    }

    //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);

    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);

    GivePlayerWeapon(playerid,WEAPON_COLT45,100);
    //GivePlayerWeapon(playerid,WEAPON_MP5,100);
    TogglePlayerClock(playerid, 0);

    return 1;
}

//----------------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)
{
		new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
        GetPlayerName(killerid, killerName, sizeof(killerName));
        GetPlayerName(playerid, playerName, sizeof(playerName));
        if (killerid != INVALID_PLAYER_ID)
        {
                switch (reason)
                {
                        case 0: reasonMsg = "Unarmed";
                        case 1: reasonMsg = "Brass Knuckles";
                        case 2: reasonMsg = "Golf Club";
                        case 3: reasonMsg = "Night Stick";
                        case 4: reasonMsg = "Knife";
                        case 5: reasonMsg = "Baseball Bat";
                        case 6: reasonMsg = "Shovel";
                        case 7: reasonMsg = "Pool Cue";
                        case 8: reasonMsg = "Katana";
                        case 9: reasonMsg = "Chainsaw";
                        case 10: reasonMsg = "Dildo";
                        case 11: reasonMsg = "Dildo";
                        case 12: reasonMsg = "Vibrator";
                        case 13: reasonMsg = "Vibrator";
                        case 14: reasonMsg = "Flowers";
                        case 15: reasonMsg = "Cane";
                        case 22: reasonMsg = "Pistol";
                        case 23: reasonMsg = "Silenced Pistol";
                        case 24: reasonMsg = "Desert Eagle";
                        case 25: reasonMsg = "Shotgun";
                        case 26: reasonMsg = "Sawn-off Shotgun";
                        case 27: reasonMsg = "Combat Shotgun";
                        case 28: reasonMsg = "MAC-10";
                        case 29: reasonMsg = "MP5";
                        case 30: reasonMsg = "AK-47";
                        case 31: reasonMsg = "M4";
                        case 32: reasonMsg = "TEC-9";
                        case 33: reasonMsg = "Country Rifle";
                        case 34: reasonMsg = "Sniper Rifle";
                        case 37: reasonMsg = "Fire";
                        case 38: reasonMsg = "Minigun";
                        case 41: reasonMsg = "Spray Can";
                        case 42: reasonMsg = "Fire Extinguisher";
                        case 49: reasonMsg = "Vehicle Collision";
                        case 50: reasonMsg = "Vehicle Collision";
                        case 51: reasonMsg = "Explosion";
                        default: reasonMsg = "Unknown";
                }
                format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
        }
        else
        {
                switch (reason)
                {
                        case 53: format(msg, sizeof(msg), "04*** %s died. (Drowned)", playerName);
                        case 54: format(msg, sizeof(msg), "04*** %s died. (Collision)", playerName);
                        default: format(msg, sizeof(msg), "04*** %s died.", playerName);
                }
        }
        IRC_GroupSay(groupID, IRC_CHANNEL, msg);
        return 1;

	new playercash;

    // if they ever return to class selection make them city
    // select again first
    gPlayerHasCitySelected[playerid] = 0;

    if(killerid == INVALID_PLAYER_ID) {
        ResetPlayerMoney(playerid);
    } else {
        playercash = GetPlayerMoney(playerid);
        if(playercash > 0)  {
            GivePlayerMoney(killerid, playercash);
            ResetPlayerMoney(playerid);
        }
    }
    return 1;
}

//----------------------------------------------------------

ClassSel_SetupCharSelection(playerid)
{
    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        SetPlayerInterior(playerid,11);
        SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
        SetPlayerFacingAngle(playerid,0.0);
        SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
        SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
    }
    else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        SetPlayerInterior(playerid,3);
        SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
        SetPlayerFacingAngle(playerid,181.0);
        SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
        SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
    }
    else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        SetPlayerInterior(playerid,3);
        SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
        SetPlayerFacingAngle(playerid,286.25);
        SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
        SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
    }

}

//----------------------------------------------------------
// Used to init textdraws of city names

ClassSel_InitCityNameText(Text:txtInit)
{
    TextDrawUseBox(txtInit, 0);
    TextDrawLetterSize(txtInit,1.25,3.0);
    TextDrawFont(txtInit, 0);
    TextDrawSetShadow(txtInit,0);
    TextDrawSetOutline(txtInit,1);
    TextDrawColor(txtInit,0xEEEEEEFF);
    TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
}

//----------------------------------------------------------

ClassSel_InitTextDraws()
{
    // Init our observer helper text display
    txtLosSantos = TextDrawCreate(10.0, 380.0, "Los Santos");
    ClassSel_InitCityNameText(txtLosSantos);
    txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro");
    ClassSel_InitCityNameText(txtSanFierro);
    txtLasVenturas = TextDrawCreate(10.0, 380.0, "Las Venturas");
    ClassSel_InitCityNameText(txtLasVenturas);

    // Init our observer helper text display
    txtClassSelHelper = TextDrawCreate(10.0, 415.0,
       " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
    TextDrawUseBox(txtClassSelHelper, 1);
    TextDrawBoxColor(txtClassSelHelper,0x222222BB);
    TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
    TextDrawTextSize(txtClassSelHelper,400.0,40.0);
    TextDrawFont(txtClassSelHelper, 2);
    TextDrawSetShadow(txtClassSelHelper,0);
    TextDrawSetOutline(txtClassSelHelper,1);
    TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
    TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
}

//----------------------------------------------------------

ClassSel_SetupSelectedCity(playerid)
{
    if(gPlayerCitySelection[playerid] == -1) {
        gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }

    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
        SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);

        TextDrawShowForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
        SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);

        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawShowForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
        SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);

        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawShowForPlayer(playerid,txtLasVenturas);
    }
}

//----------------------------------------------------------

ClassSel_SwitchToNextCity(playerid)
{
    gPlayerCitySelection[playerid]++;
    if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
        gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }
    PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    ClassSel_SetupSelectedCity(playerid);
}

//----------------------------------------------------------

ClassSel_SwitchToPreviousCity(playerid)
{
    gPlayerCitySelection[playerid]--;
    if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
        gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
    }
    PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    ClassSel_SetupSelectedCity(playerid);
}

//----------------------------------------------------------

ClassSel_HandleCitySelection(playerid)
{
    new Keys,ud,lr;
    GetPlayerKeys(playerid,Keys,ud,lr);

    if(gPlayerCitySelection[playerid] == -1) {
        ClassSel_SwitchToNextCity(playerid);
        return;
    }

    // only allow new selection every ~500 ms
    if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;

    if(Keys & KEY_FIRE) {
        gPlayerHasCitySelected[playerid] = 1;
        TextDrawHideForPlayer(playerid,txtClassSelHelper);
        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
        TogglePlayerSpectating(playerid,0);
        return;
    }

    if(lr > 0) {
       ClassSel_SwitchToNextCity(playerid);
    }
    else if(lr < 0) {
       ClassSel_SwitchToPreviousCity(playerid);
    }
}

//----------------------------------------------------------

public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;

    if(gPlayerHasCitySelected[playerid]) {
        ClassSel_SetupCharSelection(playerid);
        return 1;
    } else {
        if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
            TextDrawShowForPlayer(playerid, txtClassSelHelper);
            gPlayerCitySelection[playerid] = -1;
        }
    }

    return 0;
}

//----------------------------------------------------------

public OnGameModeInit()
{

        // Connect the first bot
        botIDs[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
        // Set the connect delay for the first bot to 20 seconds
        IRC_SetIntData(botIDs[0], E_IRC_CONNECT_DELAY, 20);
        // Connect the second bot
        botIDs[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
        // Set the connect delay for the second bot to 30 seconds
        IRC_SetIntData(botIDs[1], E_IRC_CONNECT_DELAY, 30);
        // Create a group (the bots will be added to it upon connect)
        groupID = IRC_CreateGroup();


#define USE_TEXTDRAW_SET 1
AddRadioStation("Radio Julius", "http://78.72.181.195:8000/listen.pls", 1);
AddRadioStation("Vinylgodis", "http://93.182.176.123/listen.pls", 1);
AddRadioStation("Radio Seven", "http://www.radioseven.se/128.pls", 1);
AddRadioStation("Dansbandskanalen", "http://www.guldkanalen.se/static/streamDBK/128MP3.pls", 1);
AddRadioStation("Din Gata", "http://sverigesradio.se/topsy/direkt/2576-hi-mp3.pls", 1);
AddRadioStation("Big R Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=73131", 1);
AddRadioStation("Radio AF", "http://webradio.af.lu.se:8000/listen.pls", 1);
AddRadioStation("Reggae141.com", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=85742", 1);
AddRadioStation("Hit Radio N1", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1277314", 1);
AddRadioStation("The 1920s Radio Network", "http://64.5.130.43/listen.pls", 1);
AddRadioStation("LAs HOT Country", "http://46.21.151.98:8000/listen.pls", 1);
AddRadioStation("Fade FM", "http://37.59.61.51/listen.pls", 1);
AddRadioStation("Grand Theft Auto San Andreas", "http://listen.radionomy.com/grand-theft-auto-san-andreas.m3u", 1);
AddRadioStation("Radio Off", "", 1);




    SetGameModeText("Free Mode, stunts, races etc.");
    ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
    ShowNameTags(1);
    SetNameTagDrawDistance(40.0);
    EnableStuntBonusForAll(0);
    DisableInteriorEnterExits();
    SetWeather(2);
    SetWorldTime(11);

    //UsePlayerPedAnims();
    //ManualVehicleEngineAndLights();
    //LimitGlobalChatRadius(300.0);

    ClassSel_InitTextDraws();

    // Player Class
    AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(282,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(283,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(284,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(285,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(286,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(287,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(288,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(265,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(266,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(267,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(268,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(42,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(74,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);

    AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(281,2385.7600,-1281.1403,24.4851,115.8818,0,0,0,0,0,0); //

    //AddVehicles
    AddStaticVehicle(600,2461.7532,-1656.6047,13.0208,90.0551,43,8); // car0
    AddStaticVehicle(439,-1766.9050,613.7802,28.0963,90.1726,79,78); // car1
    AddStaticVehicle(549,-1997.1497,701.7988,45.0459,0.2772,14,14); // car2
    AddStaticVehicle(480,-1997.1570,696.1385,45.1418,0.9108,127,8); // car3
    AddStaticVehicle(555,-1997.1226,690.4085,45.0497,0.4574,58,1); // car4
    AddStaticVehicle(533,-1997.1150,684.5101,45.0449,0.7273,7,1); // car5
    AddStaticVehicle(518,-1997.1124,678.0267,44.9521,1.0255,8,0); // car6
    AddStaticVehicle(542,-1997.1284,671.6221,44.1768,0.8896,45,92); // car7
    AddStaticVehicle(419,-1997.0178,664.9196,42.9615,0.3890,1,76); // car8
    AddStaticVehicle(502,-1944.3131,585.5934,35.0131,0.5602,36,88); // car9
    AddStaticVehicle(451,-1947.4026,585.6334,34.7825,0.5844,1,36); // car10
    AddStaticVehicle(506,-1950.4606,585.7036,34.8199,1.4687,126,52); // car 11
    AddStaticVehicle(477,-1938.2062,585.5255,34.8710,359.9006,65,1); // car12
    AddStaticVehicle(602,-1953.4102,585.8502,34.8846,359.4462,94,1); // car 13
    AddStaticVehicle(496,-1956.5023,585.9746,34.7861,0.1029,2,6); // car14
    AddStaticVehicle(402,-1959.3685,585.6564,34.9014,359.6677,86,110); // car15
    AddStaticVehicle(541,-1935.3408,585.7760,34.7403,0.0132,126,6); // car16
    AddStaticVehicle(415,-1932.3533,585.5296,34.8907,0.0465,119,1); // car17
    AddStaticVehicle(587,-1929.2599,586.0511,34.8377,359.7012,0,1); // car18
    AddStaticVehicle(504,-1926.2498,585.7791,34.9114,359.2645,45,29); // car19
    AddStaticVehicle(598,-1616.6740,651.2231,6.9347,0.8125,0,1); // car20
    AddStaticVehicle(601,-1628.8429,651.0104,6.9463,359.6806,1,1); // car21
    AddStaticVehicle(427,-1605.2008,651.7350,7.3193,359.6695,0,1); // car22
    AddStaticVehicle(596,-1599.6945,651.1352,6.9087,359.4665,0,1); // car23
    AddStaticVehicle(514,-1658.1969,449.0964,7.7671,213.6456,25,1); // car24
    AddStaticVehicle(432,-1450.3162,458.0264,7.1965,358.0674,43,0); // car25
    AddStaticVehicle(596,-1587.6300,651.6120,6.9087,358.3333,0,1); // car26
    AddStaticVehicle(596,-1581.8977,651.7803,6.9078,359.2933,0,1); // car27
    AddStaticVehicle(598,-1594.4235,673.0942,6.9332,179.1243,0,1); // car28
    AddStaticVehicle(598,-1600.0331,673.0317,6.9328,179.5085,0,1); // car29
    AddStaticVehicle(490,-1574.2876,714.2642,-5.1145,89.0129,0,0); // car30
    AddStaticVehicle(490,-1574.2661,710.3427,-5.1147,89.1375,0,0); // car31
    AddStaticVehicle(490,-1574.1755,706.1642,-5.1146,90.7530,0,0); // car32
    AddStaticVehicle(596,-1573.6791,722.1187,-5.5211,90.6117,0,1); // car33
    AddStaticVehicle(596,-1573.8575,730.6639,-5.5217,89.7573,0,1); // car34
    AddStaticVehicle(596,-1573.5385,734.4633,-5.5220,88.8792,0,1); // car35
    AddStaticVehicle(596,-1573.4248,739.0908,-5.5221,90.4690,0,1); // car36
    AddStaticVehicle(596,-1573.2230,742.5228,-5.5208,89.2028,0,1); // car37
    AddStaticVehicle(598,-1600.3463,749.7092,-5.4954,180.3100,0,1); // car38
    AddStaticVehicle(598,-1604.2474,749.6938,-5.4956,179.8932,0,1); // car39
    AddStaticVehicle(598,-1608.4534,749.6821,-5.4960,180.4397,0,1); // car40
    AddStaticVehicle(598,-1612.7340,749.6252,-5.4962,181.2642,0,1); // car41
    AddStaticVehicle(598,-1616.6920,749.7081,-5.4970,179.9954,0,1); // car41
    AddStaticVehicle(598,-1592.1154,749.6444,-5.4973,179.6934,0,1); // car43
    AddStaticVehicle(598,-1587.9971,749.8513,-5.4958,178.9971,0,1); // car44
    AddStaticVehicle(598,-1583.9622,749.8259,-5.4954,179.3184,0,1); // car45
    AddStaticVehicle(598,-1579.9960,749.7203,-5.4958,179.3284,0,1); // car46
    AddStaticVehicle(597,-1622.7053,649.7056,-5.4738,88.5598,0,1); // car47
    AddStaticVehicle(596,-1639.5427,674.1429,-5.5225,269.2240,0,1); // car48
    AddStaticVehicle(596,-1639.6805,682.0773,-5.5206,270.4482,0,1); // car49
    AddStaticVehicle(597,-1639.7576,686.4487,-5.4733,271.0222,0,1); // car50
    AddStaticVehicle(597,-1639.8285,669.9292,-5.4740,269.2921,0,1); // car51
    AddStaticVehicle(596,-1639.7863,666.1780,-5.5219,269.8799,0,1); // car52
    AddStaticVehicle(597,-1639.9882,661.8076,-5.4729,269.4359,0,1); // car53
    AddStaticVehicle(596,-1639.7858,657.7263,-5.5219,270.1051,0,1); // car54
    AddStaticVehicle(597,-1639.8157,653.7025,-5.4737,268.7205,0,1); // car55
    AddStaticVehicle(596,-1639.5710,649.8344,-5.5219,269.4172,0,1); // car56
    AddStaticVehicle(598,-1595.6241,694.0532,-5.4961,180.6208,0,1); // car57
    AddStaticVehicle(598,-1600.1334,693.9891,-5.4959,179.8698,0,1); // car58
    AddStaticVehicle(598,-1604.2416,693.9874,-5.4968,179.3441,0,1); // car59
    AddStaticVehicle(598,-1608.5326,694.0151,-5.4969,179.8332,0,1); // car60
    AddStaticVehicle(598,-1612.3291,694.0125,-5.4954,180.4067,0,1); // car61
    AddStaticVehicle(598,-1616.5938,694.0545,-5.4963,180.0018,0,1); // car62
    AddStaticVehicle(598,-1620.7970,694.0438,-5.4966,179.2025,0,1); // car63
    AddStaticVehicle(598,-1624.8109,693.9700,-5.4957,177.9268,0,1); // car64
    AddStaticVehicle(598,-1628.9708,693.9097,-5.4965,179.0654,0,1); // car65
    AddStaticVehicle(598,-1632.7097,693.9340,-5.4964,178.4928,0,1); // car66
    AddStaticVehicle(427,-1596.4033,678.2721,-5.1103,1.2281,0,1); // car67
    AddStaticVehicle(427,-1611.6322,733.2242,-5.1102,358.4313,0,1); // car68
    AddStaticVehicle(601,-1603.5253,733.0418,-5.4757,0.2952,1,1); // car69
    AddStaticVehicle(601,-1607.4572,732.7892,-5.4819,359.0168,1,1); // car70
    AddStaticVehicle(601,-1590.8903,718.8868,-5.4834,271.2448,1,1); // car71
    AddStaticVehicle(601,-1590.8268,714.7463,-5.4834,268.9313,1,1); // car72
    AddStaticVehicle(601,-1604.3324,676.1072,-5.4834,1.0470,1,1); // car73
    AddStaticVehicle(601,-1608.3807,675.8729,-5.4834,0.8872,1,1); // car74
    AddStaticVehicle(601,-1640.4934,690.0363,-5.4834,267.7431,1,1); // car75
    AddStaticVehicle(601,-1636.2931,694.5077,-5.4834,186.3782,1,1); // car76
    AddStaticVehicle(601,-1622.6899,657.6486,-5.4834,89.5577,1,1); // car77
    AddStaticVehicle(601,-1622.5437,661.3481,-5.4834,88.2688,1,1); // car78
    AddStaticVehicle(601,-1571.8530,745.8903,-5.4834,89.7020,1,1); // car79
    AddStaticVehicle(601,-1576.2029,749.3005,-5.4835,173.8618,1,1); // car80
    AddStaticVehicle(497,-1632.6996,671.5107,7.3643,268.2399,0,1); // car81
    AddStaticVehicle(449,-1857.2998,603.2500,35.4973,270.0000,1,74); // tram82
    
	







	//Objects
	CreateObject(13592, 1966.19921875, -2460.3994140625, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.0999755859, -2516, 40.299999237061, 0, 30, 0);
	CreateObject(18478, 1725.0999755859, -2515.8000488281, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(13592, 1966.1999511719, -2460.3999023438, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.0999755859, -2516, 40.299999237061, 0, 30, 0);
	CreateObject(18478, 1725.099609375, -2515.7998046875, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(5314, 1597, -1196, 343.10000610352, 0, 0, 90);
	CreateObject(615, 1566.5999755859, -1305.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.4000244141, -1304.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.1999511719, -1286.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.1999511719, -1283.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.3000488281, -1273.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.1999511719, -1244, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566, -1262.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582, -1274.5, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1565.6999511719, -1259.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.6999511719, -1244.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1567.5999755859, -1224.8000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1583.0999755859, -1224.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1568.5999755859, -1211.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1583, -1210.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1567.3000488281, -1195.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1581.8000488281, -1194.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1565.6999511719, -1182.8000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.8000488281, -1182.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1568.4000244141, -1168.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.9000244141, -1168.1999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1569.1999511719, -1153.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1584.5, -1158.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1573.9000244141, -1143.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1588.3000488281, -1149.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1577.4000244141, -1133.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1591, -1139.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.9000244141, -1123.5, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1597, -1131.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1590.4000244141, -1115.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1602.6999511719, -1122.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1597.1999511719, -1105, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1609, -1115.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1606.5999755859, -1095.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1615.9000244141, -1106.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(13592, 1966.1999511719, -2460.3999023438, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.099609375, -2516, 40.299999237061, 0, 29.998168945313, 0);
	CreateObject(18478, 1725.0999755859, -2515.8000488281, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(17300, -1387.5999755859, -276.79998779297, 46.200000762939, 351.98559570313, 0, 315);
	CreateObject(17300, -1548, -463.29998779297, 83.800003051758, 1, 0, 315);
	CreateObject(17300, -1699.8000488281, -639.90002441406, 113, 355, 0, 315);
	CreateObject(18483, -1803.5999755859, -760, 130.89999389648, 0, 0, 48);
	CreateObject(1634, -1297.5, -176, 14.39999961853, 0, 0, 315);
	CreateObject(1634, -1300.5, -173.10000610352, 14.39999961853, 0, 0, 315);
	CreateObject(5112, -970.40002441406, 514.90002441406, 9.6999998092651, 0, 0, 40);
	CreateObject(5112, -858.5, 617.29998779297, 10, 0, 0, 45);
	CreateObject(1632, -786.79998779297, 695.20001220703, 17.39999961853, 0, 0, 135);
	CreateObject(4710, -1178, 424.5, 13.39999961853, 0, 0, 160);
	CreateObject(4148, -1283.3000488281, 470.70001220703, 6.3000001907349, 353, 0, 70);
	CreateObject(8040, 1648.1999511719, -1064.6999511719, 343.89999389648, 0, 0, 225);
	CreateObject(4150, 1576.6999511719, -1368.4000244141, 343.10000610352, 0, 0, 0);
	CreateObject(4150, 1576.6999511719, -1484.4000244141, 322.60000610352, 20, 0, 0);
	CreateObject(4150, 1576.9000244141, -1572.8000488281, 290.5, 20, 0, 0);
	CreateObject(4150, 1577.0999755859, -1681.5999755859, 245.39999389648, 25, 0, 0);
	CreateObject(4150, 1577.0999755859, -1787.8000488281, 194.73950195313, 26, 0, 0);
	CreateObject(13641, 1578.5, -1845.8000488281, 169.80000305176, 0, 0, 270);
	CreateObject(13641, 1572.0999755859, -1845.9000244141, 169.80000305176, 0, 0, 270);
	CreateObject(13641, 1478.5999755859, -2567.3999023438, 14.5, 0, 0, 0);
	CreateObject(13641, 1477.5999755859, -2552.5, 12.5, 0, 0, 0);
	CreateObject(13640, 1511.3000488281, -2533.6999511719, 13.60000038147, 0, 0, 0);
	CreateObject(13592, 1543.9000244141, -2529.5, 22.700000762939, 0, 0, 5);
	CreateObject(1634, 1775.5999755859, -2569.6000976563, 13.800000190735, 0, 0, 0);
	CreateObject(1634, 1774.5, -2518.8999023438, 13.800000190735, 0, 0, 180);
	CreateObject(3567, 1777, -2455.8000488281, 13.39999961853, 0, 0, 0);
	CreateObject(12932, 1802.5999755859, -2436.6999511719, 15.89999961853, 0, 0, 0);
	CreateObject(7515, 1727.8000488281, -2459.1999511719, 18.5, 0, 0, 0);
	CreateObject(3625, 1557.9000244141, -2460.8000488281, 15.39999961853, 0, 0, 0);
	CreateObject(8302, 1593.5, -2445.3000488281, 14.60000038147, 0, 0, 0);
	CreateObject(8040, 1893.0999755859, -2283.8999023438, 13.5, 0, 0, 0);
	CreateObject(13666, 1929.6999511719, -2343.6999511719, 18.299999237061, 0, 0, 0);
	CreateObject(9076, 1889.4000244141, -2675, 43.400001525879, 0, 0, 270);
	CreateObject(16778, 1896.9000244141, -2449.3999023438, 12.5, 0, 0, 0);
	CreateObject(16776, 1936.5, -2428.8000488281, 12.5, 0, 0, 0);
	CreateObject(13562, 1810.8000488281, -2646.3999023438, 24.10000038147, 0, 0, 0);
	CreateObject(13667, 1841.5, -2641.6999511719, 38.599998474121, 0, 0, 95);
	CreateObject(14608, 1823.5, -2641.3000488281, 27.60000038147, 0, 0, 325);
	CreateObject(16776, 1754.3000488281, -2647.3999023438, 25.39999961853, 0, 0, 180);
	CreateObject(1634, 1970.5999755859, -2428.3999023438, 13.800000190735, 0, 0, 90);
	CreateObject(18483, 2476.5, -1659.0999755859, 12, 0, 329.13635253906, 0);
	CreateObject(18483, 2541.6999511719, -1659, 31, 0, 358.17993164063, 0);
	CreateObject(18483, 2575.1999511719, -1659, 32.099998474121, 0, 330, 0);
	CreateObject(18483, 2605.3999023438, -1659, 49.5, 0, 330, 0);
	CreateObject(18483, 2624.8000488281, -1659.0999755859, 60.700000762939, 0, 330, 0);
	CreateObject(18483, 2655.1000976563, -1659.4000244141, 78.099998474121, 0, 330, 0);
	CreateObject(17300, 2809.8994140625, -1658.69921875, 102.80000305176, 3.8397216796875, 0, 85.995483398438);
	CreateObject(13139, 172.80000305176, 109.5, 492.70001220703, 0, 0, 0);
	CreateObject(17062, 3026.1000976563, -1656.5999755859, 163.5, 331.5, 0, 87);
	CreateObject(8420, 3161.1999511719, -1644.5999755859, 217.69999694824, 346, 0, 19);
	CreateObject(13641, 2369.3999023438, -1658.8000488281, 12.39999961853, 0, 0, 178);

    // SPECIAL
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

    // LAS VENTURAS
     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

    // SAN FIERRO
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

    // LOS SANTOS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

    // OTHER AREAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");


    printf("Total vehicles from files: %d",total_vehicles_from_files);

    return 1;
}

//----------------------------------------------------------


public OnPlayerUpdate(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0;
    if(IsPlayerNPC(playerid)) return 1;

    // changing cities by inputs
    if( !gPlayerHasCitySelected[playerid] &&
        GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
        ClassSel_HandleCitySelection(playerid);
        return 1;
    }

    // No weapons in interiors
    if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
        SetPlayerArmedWeapon(playerid,0); // fists
        return 0; // no syncing until they change their weapon
    }

    // Don't allow minigun
    if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
        Kick(playerid);
        return 0;
    }

    /* No jetpacks allowed
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
        Kick(playerid);
        return 0;
    }*/

    /* For testing animations
    new msg[128+1];
    new animlib[32+1];
    new animname[32+1];

    thisanimid = GetPlayerAnimationIndex(playerid);
    if(lastanimid != thisanimid)
    {
        GetAnimationName(thisanimid,animlib,32,animname,32);
        format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname);
        lastanimid = thisanimid;
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }*/

    return 1;
}

//----------------------------------------------------------

enum
{
    E_STREAMER_ATTACHED_OBJECT,
    E_STREAMER_ATTACHED_PLAYER,
    E_STREAMER_ATTACHED_VEHICLE,
    E_STREAMER_ATTACH_OFFSET_X,
    E_STREAMER_ATTACH_OFFSET_Y,
    E_STREAMER_ATTACH_OFFSET_Z,
    E_STREAMER_ATTACH_R_X,
    E_STREAMER_ATTACH_R_Y,
    E_STREAMER_ATTACH_R_Z,
    E_STREAMER_ATTACH_X,
    E_STREAMER_ATTACH_Y,
    E_STREAMER_ATTACH_Z,
    E_STREAMER_COLOR,
    E_STREAMER_DRAW_DISTANCE,
    E_STREAMER_EXTRA_ID,
    E_STREAMER_INTERIOR_ID,
    E_STREAMER_MAX_X,
    E_STREAMER_MAX_Y,
    E_STREAMER_MAX_Z,
    E_STREAMER_MIN_X,
    E_STREAMER_MIN_Y,
    E_STREAMER_MIN_Z,
    E_STREAMER_MODEL_ID,
    E_STREAMER_MOVE_R_X,
    E_STREAMER_MOVE_R_Y,
    E_STREAMER_MOVE_R_Z,
    E_STREAMER_MOVE_SPEED,
    E_STREAMER_MOVE_X,
    E_STREAMER_MOVE_Y,
    E_STREAMER_MOVE_Z,
    E_STREAMER_NEXT_X,
    E_STREAMER_NEXT_Y,
    E_STREAMER_NEXT_Z,
    E_STREAMER_PLAYER_ID,
    E_STREAMER_R_X,
    E_STREAMER_R_Y,
    E_STREAMER_R_Z,
    E_STREAMER_SIZE,
    E_STREAMER_STREAM_DISTANCE,
    E_STREAMER_STYLE,
    E_STREAMER_TEST_LOS,
    E_STREAMER_TYPE,
    E_STREAMER_WORLD_ID,
    E_STREAMER_X,
    E_STREAMER_Y,
    E_STREAMER_Z
}

//----------------------------------------------------------

CMD:healme(playerid, params[])
{
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, 0xFFFF00AA, "Julius95Bot: You have successfully healed yourself!");
    SendClientMessage(playerid, 0xFFFF00AA, "Julius95Bot: Don't abuse this command for example during fights or you may get kicked and banned!");
    return 1;
}

CMD:fix(playerid, params[])
{
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "SpyBot: You are not in a vehicle!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, 0xFFFFFFFF, "SpyBot: Your vehicle has been successfully repaired!");
    return 1;
}
//----------------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        new veh = GetPlayerVehicleID(playerid);
        AddVehicleComponent(veh,1010);
        return 1;
    }
    return 1;
}

//----------------------------------------------------------

public OnPlayerText(playerid, text[])
{
        new name[MAX_PLAYER_NAME], ircMsg[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
        IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
        return 1;
}

//----------------------------------------------------------

public IRC_OnConnect(botid, ip[], port)
{
        printf("*** IRC_OnConnect: Bot ID %d connected to %s:%d", botid, ip, port);
        // Join the channel
        IRC_JoinChannel(botid, IRC_CHANNEL);
        // Add the bot to the group
        IRC_AddToGroup(groupID, botid);
new str[60];
format(str, 60, "nickserv identify %s", IRC_PASSWORD);
IRC_SendRaw(botid, str);
		return 1;

}

/*
        This callback is executed whenever a current connection is closed. The
        plugin may automatically attempt to reconnect per user settings. IRC_Quit
        may be called at any time to stop the reconnection process.
*/

public IRC_OnDisconnect(botid, ip[], port, reason[])
{


		printf("*** IRC_OnDisconnect: Bot ID %d disconnected from %s:%d (%s)", botid, ip, port, reason);
        // Remove the bot from the group
        IRC_RemoveFromGroup(groupID, botid);
        return 1;
}

/*
        This callback is executed whenever a connection attempt begins. IRC_Quit may
        be called at any time to stop the reconnection process.
*/

public IRC_OnConnectAttempt(botid, ip[], port)
{
        printf("*** IRC_OnConnectAttempt: Bot ID %d attempting to connect to %s:%d...", botid, ip, port);
	    return 1;
}

/*
        This callback is executed whenever a connection attempt fails. IRC_Quit may
        be called at any time to stop the reconnection process.
*/

public IRC_OnConnectAttemptFail(botid, ip[], port, reason[])
{
        printf("*** IRC_OnConnectAttemptFail: Bot ID %d failed to connect to %s:%d (%s)", botid, ip, port, reason);
        return 1;
}

/*
        This callback is executed whenever a bot joins a channel.
*/

public IRC_OnJoinChannel(botid, channel[])
{
        printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s", botid, channel);
        return 1;
}

/*
        This callback is executed whenevever a bot leaves a channel.
*/

public IRC_OnLeaveChannel(botid, channel[], message[])
{
        printf("*** IRC_OnLeaveChannel: Bot ID %d left channel %s (%s)", botid, channel, message);
        return 1;
}

/*
        This callback is executed whenevever a bot is invited to a channel.
*/

public IRC_OnInvitedToChannel(botid, channel[], invitinguser[], invitinghost[])
{
        printf("*** IRC_OnInvitedToChannel: Bot ID %d invited to channel %s by %s (%s)", botid, channel, invitinguser, invitinghost);
        IRC_JoinChannel(botid, channel);
        return 1;
}

/*
        This callback is executed whenevever a bot is kicked from a channel. If the
        bot cannot immediately rejoin the channel (in the event, for example, that
        the bot is kicked and then banned), you might want to set up a timer here
        for rejoin attempts.
*/

public IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[])
{
        printf("*** IRC_OnKickedFromChannel: Bot ID %d kicked by %s (%s) from channel %s (%s)", botid, oppeduser, oppedhost, channel, message);
        IRC_JoinChannel(botid, channel);
        return 1;
}

public IRC_OnUserDisconnect(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserDisconnect (Bot ID %d): User %s (%s) disconnected (%s)", botid, user, host, message);
        return 1;
}

public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
        printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s", botid, user, host, channel);
        return 1;
}

public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
{
        printf("*** IRC_OnUserLeaveChannel (Bot ID %d): User %s (%s) left channel %s (%s)", botid, user, host, channel, message);
        return 1;
}

public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
{
        printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): User %s kicked by %s (%s) from channel %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
}

public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
        printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his/her nick to %s", botid, oldnick, host, newnick);
        return 1;
}

public IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[])
{
        printf("*** IRC_OnUserSetChannelMode (Bot ID %d): User %s (%s) on %s set mode: %s", botid, user, host, channel, mode);
        return 1;
}

public IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[])
{
        printf("*** IRC_OnUserSetChannelTopic (Bot ID %d): User %s (%s) on %s set topic: %s", botid, user, host, channel, topic);
        return 1;
}

public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
        printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
        // Someone sent the first bot a private message
        if (!strcmp(recipient, BOT_1_NICKNAME))
        {
                IRC_Say(botid, user, "You sent me a PM!");
        }
        return 1;
}

public IRC_OnUserNotice(botid, recipient[], user[], host[], message[])
{
        printf("*** IRC_OnUserNotice (Bot ID %d): User %s (%s) sent notice to %s: %s", botid, user, host, recipient, message);
        // Someone sent the second bot a notice (probably a network service)
        if (!strcmp(recipient, BOT_2_NICKNAME))
        {
                IRC_Notice(botid, user, "You sent me a notice!");
        }
        return 1;
}

public IRC_OnUserRequestCTCP(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserRequestCTCP (Bot ID %d): User %s (%s) sent CTCP request: %s", botid, user, host, message);
        // Someone sent a CTCP VERSION request
        if (!strcmp(message, "VERSION"))
        {
                IRC_ReplyCTCP(botid, user, "VERSION SA-MP IRC Plugin v" #PLUGIN_VERSION "");
        }
        return 1;
}

public IRC_OnUserReplyCTCP(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserReplyCTCP (Bot ID %d): User %s (%s) sent CTCP reply: %s", botid, user, host, message);
        return 1;
}

/*
        This callback is useful for logging, debugging, or catching error messages
        sent by the IRC server.
*/

public IRC_OnReceiveRaw(botid, message[])
{
        new File:file;
        if (!fexist("irc_log.txt"))
        {
                file = fopen("irc_log.txt", io_write);
        }
        else
        {
                file = fopen("irc_log.txt", io_append);
        }
        if (file)
        {
                fwrite(file, message);
                fwrite(file, "\r\n");
                fclose(file);
        }
        return 1;
}

/*
        Some examples of channel commands are here. You can add more very easily;
        their implementation is identical to that of ZeeX's zcmd.
*/

IRCCMD:say(botid, channel[], user[], host[], params[])
{
        // Check if the user has at least voice in the channel
        if (IRC_IsVoice(botid, channel, user))
        {
                // Check if the user entered any text
                if (!isnull(params))
                {
                        new msg[128];
                        // Echo the formatted message
                        format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
                        SendClientMessageToAll(0x0000FFFF, msg);
                }
        }
        return 1;
}

IRCCMD:kick(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least a halfop in the channel
        if (IRC_IsHalfop(botid, channel, user))
        {
                new playerid, reason[64];
                // Check if the user at least entered a player ID
                if (sscanf(params, "dS(No reason)[64]", playerid, reason))
                {
                        return 1;
                }
                // Check if the player is connected
                if (IsPlayerConnected(playerid))
                {
                        // Echo the formatted message
                        new msg[128], name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(msg, sizeof(msg), "02*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
                        SendClientMessageToAll(0x0000FFFF, msg);
                        // Kick the player
                        Kick(playerid);
                }
        }
        return 1;
}

IRCCMD:ban(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least an op in the channel
        if (IRC_IsOp(botid, channel, user))
        {
                new playerid, reason[64];
                // Check if the user at least entered a player ID
                if (sscanf(params, "dS(No reason)[64]", playerid, reason))
                {
                        return 1;
                }
                // Check if the player is connected
                if (IsPlayerConnected(playerid))
                {
                        // Echo the formatted message
                        new msg[128], name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (%s)", name, user, reason);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", name, user, reason);
                        SendClientMessageToAll(0x0000FFFF, msg);
                        // Ban the player
                        BanEx(playerid, reason);
                }
        }
        return 1;
}

IRCCMD:rcon(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least an op in the channel
        if (IRC_IsOp(botid, channel, user))
        {
                // Check if the user entered any text
                if (!isnull(params))
                {
                        // Check if the user did not enter any invalid commands
                        if (strcmp(params, "exit", true) != 0 && strfind(params, "loadfs irc", true) == -1)
                        {
                                // Echo the formatted message
                                new msg[128];
                                format(msg, sizeof(msg), "RCON command %s has been executed.", params);
                                IRC_GroupSay(groupID, channel, msg);
                                // Send the command
                                SendRconCommand(params);
                        }
                }
        }
        return 1;
}
Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(69) : warning 201: redefinition of constant/macro (symbol "IRC_SERVER")
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(70) : warning 201: redefinition of constant/macro (symbol "IRC_PORT")
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(103) : error 001: expected token: "{", but found "="
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(103 -- 107) : error 008: must be a constant expression; assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(112) : error 010: invalid function or declaration
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(114) : error 021: symbol already defined: "VehicleInfo"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(130) : error 017: undefined symbol "Temp"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 017: undefined symbol "onsys"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : warning 215: expression has no effect
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 001: expected token: ";", but found "]"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 029: invalid expression, assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Reply
#7

To get rid of the error you fix the problem
Don't make your tittles help!
Reply
#8

Quote:
Originally Posted by samp-gaming
Посмотреть сообщение
To get rid of the error you fix the problem
Don't make your tittles help!
This is Scripting Help so please stfu now, sick of your useless post and topics samp-gaming! We saw what happened with them yesterday! So now! Be quite!
Reply
#9

argh Is this serious?

I just get errors!!!

I want to put it in the gamemode

Код:
//----------------------------------------------------------
//
//  GRAND LARCENY  1.0
//  A freeroam gamemode for SA-MP 0.3
//
//----------------------------------------------------------

#include <irc>
#include <a_samp>
#include <core>
#include <ircfs>
#include <float>
#include <YSI\y_ini>
#include <streamer>
#include <sscanf2>
#include <ZCMD> //Like so!
#include <DynamicRadioStations>
#include "../include/gl_common.inc"
#include "../include/gl_spawns.inc"

#pragma tabsize 0

//----------------------------------------------------------

#define COLOR_WHITE         0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777

#define CITY_LOS_SANTOS     0
#define CITY_SAN_FIERRO     1
#define CITY_LAS_VENTURAS   2
#define Skinid 1
#define Money 2
#define Faction 3
#define irc
#define STREAMER_TYPE_OBJECT (0)
#define STREAMER_TYPE_PICKUP (1)
#define STREAMER_TYPE_CP (2)
#define STREAMER_TYPE_RACE_CP (3)
#define STREAMER_TYPE_MAP_ICON (4)
#define STREAMER_TYPE_3D_TEXT_LABEL (5)
#define STREAMER_TYPE_AREA (6)

#define STREAMER_AREA_TYPE_CIRCLE (0)
#define STREAMER_AREA_TYPE_RECTANGLE (1)
#define STREAMER_AREA_TYPE_SPHERE (2)
#define STREAMER_AREA_TYPE_CUBE (3)
#define STREAMER_AREA_TYPE_POLYGON (4)

#define STREAMER_OBJECT_TYPE_GLOBAL (0)
#define STREAMER_OBJECT_TYPE_PLAYER (1)
#define STREAMER_OBJECT_TYPE_DYNAMIC (2)


#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"

// Name that everyone will see
#define BOT_1_NICKNAME "Julius95Bot"
// Name that will only be visible in a whois
#define BOT_1_REALNAME "Julius95Bot"
// Name that will be in front of the hostname (username@hostname)
#define BOT_1_USERNAME "Julius95Bot"

#define BOT_2_NICKNAME "AdrenalineBot"
#define BOT_2_REALNAME "AdrenalineBot"
#define BOT_2_USERNAME "AdrenalineBot"

#define IRC_SERVER "irc.geekshed.net"
#define IRC_PORT (6667)
#define IRC_CHANNEL "#Julius95"

// If your bot names are registered put a password here to identify them with
#define IRC_PASSWORD "password"
#define IRC_PASSWORD "password"

// Maximum number of bots in the filterscript
#define MAX_BOTS (2)

#define PLUGIN_VERSION "1.4.3"



new total_vehicles_from_files=0;

new botIDs[MAX_BOTS], groupID;

// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new gPlayerHasCitySelected[MAX_PLAYERS];
new gPlayerLastCitySelectionTick[MAX_PLAYERS];



new Text:txtClassSelHelper;
new Text:txtLosSantos;
new Text:txtSanFierro;
new Text:txtLasVenturas;

new thisanimid=0;
new lastanimid=0;

enum vInf = { // not even sure if the equals-sign needs to be there
 vId,
 vCol1,
 vCol2
};

new VehicleInfo[MAX_VEHICLES][vInf];

// you can now call a variable like this:
VehicleInfo[vehicleid][vCol1];

new VehicleInfo[MAX_VEHICLES][];


//----------------------------------------------------------

main()
{
    print("\n---------------------------------------");
    print("Running Julius95's server\n");
    print("---------------------------------------\n");
}

//----------------------------------------------------------

public OnVehicleDeath(vehicleid,killerid)
{
	if(VehicleInfo[vehicleid][Temp] == 1) SetTimerEx("EraseVehicle", 5000,0,"i",vehicleid);
	if(onsys[vehicleid] == 1) SetTimerEx("EraseVehicle",10000,0,"i",vehicleid);
    SandInEngine[vehicleid] =0;

    for (new i = 0; i < MAX_PLAYERS; i++) {
    if (IsPlayerInVehicle(i, vehicleid)) {
    new Float:vHealth;
    GetVehicleHealth(vehicleid, vHealth);
    if (PlayerInfo[i][Autofix] == 1 && vHealth =< 250) {
    RepairVehicle(vehicleid);
	return 1;
}

//----------------------------------------------------------

COMMAND:announce(playerid, params[])
{
        
        
        if(sscanf(params,"si", params[0],params[1])) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Announce "WHITE"[Text] [Style 1-6]");
        if(params[1]>6||params[1]<0) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Ann "WHITE"[Text] [Style 1-6]");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i)) GameTextForPlayer(i, params[0], 5000, params[1]);
        }
        return 1;
}

//----------------------------------------------------------

CMD:autofix(playerid,params[]) {
        SendClientMessage(playerid,green,"Autofix is enable.");
	#pragma unused params
    	if(PlayerInfo[playerid][Autofix] == 0)	{
                SendClientMessage(playerid,green,"Player has autofix disabled.");
   	    	PlayerInfo[playerid][Autofix] = 1;
           	SendClientMessage(playerid,green,"Vehicle Auto-Fix Enabled. Do NOT use in fight.");
		} else {
                SendClientMessage(playerid,green,"Player has autofix enabled.");
   	        PlayerInfo[playerid][Autofix] = 0;
		} return SendClientMessage(playerid,red,"Vehicle Auto-Fix Disabled");
}

//----------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{

  if(strcmp(cmdtext, "/flip", true) == 0)
  {
  if(IsPlayerInAnyVehicle(playerid))
  {
    new currentveh;
    new Float:angle;
    currentveh = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(currentveh, angle);
    SetVehicleZAngle(currentveh, angle);
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: Your vehicle has been flipped.");
    return 1;
  }
  else
  {
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: You are not in any vehicle!");
    return 1;
  }
  }
   return 0;
}

//----------------------------------------------------------

public OnPlayerPrivmsg(playerid, recieverid, text[])
{

    	new string[64],playername[MAX_PLAYER_NAME],recievername[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername, sizeof(playername));
		GetPlayerName(recieverid, recievername, sizeof(recievername));
		format(string, sizeof(string), "PM from %s To %s: %s", playername,recievername, text);
		for (new a = 0; a < MAX_PLAYERS; a++)
		SendClientMessage(a, COLOR_WHITE, string);
	}
//----------------------------------------------------------

public OnPlayerDisconnect(playerid, reason)
{
        new leaveMsg[128], name[MAX_PLAYER_NAME], reasonMsg[8];
        switch(reason)
        {
                case 0: reasonMsg = "Timeout";
                case 1: reasonMsg = "Leaving";
                case 2: reasonMsg = "Kicked";
        }
        GetPlayerName(playerid, name, sizeof(name));
        format(leaveMsg, sizeof(leaveMsg), "02[%d] 03*** %s has left the server. (%s)", playerid, name, reasonMsg);
        IRC_GroupSay(groupID, IRC_CHANNEL, leaveMsg);
        return 1;
}

//----------------------------------------------------------

public OnPlayerConnect(playerid)
{

		new joinMsg[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s has joined the server.", playerid, name);
        IRC_GroupSay(groupID, IRC_CHANNEL, joinMsg);
        

	GameTextForPlayer(playerid,"~w~Julius95's Free Mode",3000,4);
    SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}J{FFFFFF}ulius's {88AA88}ser{FFFFFF}ver");

    // class selection init vars
    gPlayerCitySelection[playerid] = -1;
    gPlayerHasCitySelected[playerid] = 0;
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();

    //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);

    /*
    Removes vending machines
    RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
    */

    /*
    new ClientVersion[32];
    GetPlayerVersion(playerid, ClientVersion, 32);
    printf("Player %d reports client version: %s", playerid, ClientVersion);*/

    return 1;
}

//----------------------------------------------------------

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;

    new randSpawn = 0;

    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, 30000);

    if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_LosSantos));
        SetPlayerPos(playerid,
         gRandomSpawns_LosSantos[randSpawn][0],
         gRandomSpawns_LosSantos[randSpawn][1],
         gRandomSpawns_LosSantos[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
    }
    else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_SanFierro));
        SetPlayerPos(playerid,
         gRandomSpawns_SanFierro[randSpawn][0],
         gRandomSpawns_SanFierro[randSpawn][1],
         gRandomSpawns_SanFierro[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
    }
    else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
        randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
        SetPlayerPos(playerid,
         gRandomSpawns_LasVenturas[randSpawn][0],
         gRandomSpawns_LasVenturas[randSpawn][1],
         gRandomSpawns_LasVenturas[randSpawn][2]);
        SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
    }

    //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);

    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);

    GivePlayerWeapon(playerid,WEAPON_COLT45,100);
    //GivePlayerWeapon(playerid,WEAPON_MP5,100);
    TogglePlayerClock(playerid, 0);

    return 1;
}

//----------------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)
{
		new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
        GetPlayerName(killerid, killerName, sizeof(killerName));
        GetPlayerName(playerid, playerName, sizeof(playerName));
        if (killerid != INVALID_PLAYER_ID)
        {
                switch (reason)
                {
                        case 0: reasonMsg = "Unarmed";
                        case 1: reasonMsg = "Brass Knuckles";
                        case 2: reasonMsg = "Golf Club";
                        case 3: reasonMsg = "Night Stick";
                        case 4: reasonMsg = "Knife";
                        case 5: reasonMsg = "Baseball Bat";
                        case 6: reasonMsg = "Shovel";
                        case 7: reasonMsg = "Pool Cue";
                        case 8: reasonMsg = "Katana";
                        case 9: reasonMsg = "Chainsaw";
                        case 10: reasonMsg = "Dildo";
                        case 11: reasonMsg = "Dildo";
                        case 12: reasonMsg = "Vibrator";
                        case 13: reasonMsg = "Vibrator";
                        case 14: reasonMsg = "Flowers";
                        case 15: reasonMsg = "Cane";
                        case 22: reasonMsg = "Pistol";
                        case 23: reasonMsg = "Silenced Pistol";
                        case 24: reasonMsg = "Desert Eagle";
                        case 25: reasonMsg = "Shotgun";
                        case 26: reasonMsg = "Sawn-off Shotgun";
                        case 27: reasonMsg = "Combat Shotgun";
                        case 28: reasonMsg = "MAC-10";
                        case 29: reasonMsg = "MP5";
                        case 30: reasonMsg = "AK-47";
                        case 31: reasonMsg = "M4";
                        case 32: reasonMsg = "TEC-9";
                        case 33: reasonMsg = "Country Rifle";
                        case 34: reasonMsg = "Sniper Rifle";
                        case 37: reasonMsg = "Fire";
                        case 38: reasonMsg = "Minigun";
                        case 41: reasonMsg = "Spray Can";
                        case 42: reasonMsg = "Fire Extinguisher";
                        case 49: reasonMsg = "Vehicle Collision";
                        case 50: reasonMsg = "Vehicle Collision";
                        case 51: reasonMsg = "Explosion";
                        default: reasonMsg = "Unknown";
                }
                format(msg, sizeof(msg), "04*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
        }
        else
        {
                switch (reason)
                {
                        case 53: format(msg, sizeof(msg), "04*** %s died. (Drowned)", playerName);
                        case 54: format(msg, sizeof(msg), "04*** %s died. (Collision)", playerName);
                        default: format(msg, sizeof(msg), "04*** %s died.", playerName);
                }
        }
        IRC_GroupSay(groupID, IRC_CHANNEL, msg);
        return 1;

	new playercash;

    // if they ever return to class selection make them city
    // select again first
    gPlayerHasCitySelected[playerid] = 0;

    if(killerid == INVALID_PLAYER_ID) {
        ResetPlayerMoney(playerid);
    } else {
        playercash = GetPlayerMoney(playerid);
        if(playercash > 0)  {
            GivePlayerMoney(killerid, playercash);
            ResetPlayerMoney(playerid);
        }
    }
    return 1;
}

//----------------------------------------------------------

ClassSel_SetupCharSelection(playerid)
{
    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        SetPlayerInterior(playerid,11);
        SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
        SetPlayerFacingAngle(playerid,0.0);
        SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
        SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
    }
    else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        SetPlayerInterior(playerid,3);
        SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
        SetPlayerFacingAngle(playerid,181.0);
        SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
        SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
    }
    else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        SetPlayerInterior(playerid,3);
        SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
        SetPlayerFacingAngle(playerid,286.25);
        SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
        SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
    }

}

//----------------------------------------------------------
// Used to init textdraws of city names

ClassSel_InitCityNameText(Text:txtInit)
{
    TextDrawUseBox(txtInit, 0);
    TextDrawLetterSize(txtInit,1.25,3.0);
    TextDrawFont(txtInit, 0);
    TextDrawSetShadow(txtInit,0);
    TextDrawSetOutline(txtInit,1);
    TextDrawColor(txtInit,0xEEEEEEFF);
    TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
}

//----------------------------------------------------------

ClassSel_InitTextDraws()
{
    // Init our observer helper text display
    txtLosSantos = TextDrawCreate(10.0, 380.0, "Los Santos");
    ClassSel_InitCityNameText(txtLosSantos);
    txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro");
    ClassSel_InitCityNameText(txtSanFierro);
    txtLasVenturas = TextDrawCreate(10.0, 380.0, "Las Venturas");
    ClassSel_InitCityNameText(txtLasVenturas);

    // Init our observer helper text display
    txtClassSelHelper = TextDrawCreate(10.0, 415.0,
       " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
    TextDrawUseBox(txtClassSelHelper, 1);
    TextDrawBoxColor(txtClassSelHelper,0x222222BB);
    TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
    TextDrawTextSize(txtClassSelHelper,400.0,40.0);
    TextDrawFont(txtClassSelHelper, 2);
    TextDrawSetShadow(txtClassSelHelper,0);
    TextDrawSetOutline(txtClassSelHelper,1);
    TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
    TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
}

//----------------------------------------------------------

ClassSel_SetupSelectedCity(playerid)
{
    if(gPlayerCitySelection[playerid] == -1) {
        gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }

    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
        SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);

        TextDrawShowForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
        SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);

        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawShowForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        SetPlayerInterior(playerid,0);
        SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
        SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);

        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawShowForPlayer(playerid,txtLasVenturas);
    }
}

//----------------------------------------------------------

ClassSel_SwitchToNextCity(playerid)
{
    gPlayerCitySelection[playerid]++;
    if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
        gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }
    PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    ClassSel_SetupSelectedCity(playerid);
}

//----------------------------------------------------------

ClassSel_SwitchToPreviousCity(playerid)
{
    gPlayerCitySelection[playerid]--;
    if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
        gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
    }
    PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
    gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    ClassSel_SetupSelectedCity(playerid);
}

//----------------------------------------------------------

ClassSel_HandleCitySelection(playerid)
{
    new Keys,ud,lr;
    GetPlayerKeys(playerid,Keys,ud,lr);

    if(gPlayerCitySelection[playerid] == -1) {
        ClassSel_SwitchToNextCity(playerid);
        return;
    }

    // only allow new selection every ~500 ms
    if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;

    if(Keys & KEY_FIRE) {
        gPlayerHasCitySelected[playerid] = 1;
        TextDrawHideForPlayer(playerid,txtClassSelHelper);
        TextDrawHideForPlayer(playerid,txtLosSantos);
        TextDrawHideForPlayer(playerid,txtSanFierro);
        TextDrawHideForPlayer(playerid,txtLasVenturas);
        TogglePlayerSpectating(playerid,0);
        return;
    }

    if(lr > 0) {
       ClassSel_SwitchToNextCity(playerid);
    }
    else if(lr < 0) {
       ClassSel_SwitchToPreviousCity(playerid);
    }
}

//----------------------------------------------------------

public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;

    if(gPlayerHasCitySelected[playerid]) {
        ClassSel_SetupCharSelection(playerid);
        return 1;
    } else {
        if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
            TextDrawShowForPlayer(playerid, txtClassSelHelper);
            gPlayerCitySelection[playerid] = -1;
        }
    }

    return 0;
}

//----------------------------------------------------------

public OnGameModeInit()
{

        // Connect the first bot
        botIDs[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
        // Set the connect delay for the first bot to 20 seconds
        IRC_SetIntData(botIDs[0], E_IRC_CONNECT_DELAY, 20);
        // Connect the second bot
        botIDs[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
        // Set the connect delay for the second bot to 30 seconds
        IRC_SetIntData(botIDs[1], E_IRC_CONNECT_DELAY, 30);
        // Create a group (the bots will be added to it upon connect)
        groupID = IRC_CreateGroup();


#define USE_TEXTDRAW_SET 1
AddRadioStation("Radio Julius", "http://78.72.181.195:8000/listen.pls", 1);
AddRadioStation("Vinylgodis", "http://93.182.176.123/listen.pls", 1);
AddRadioStation("Radio Seven", "http://www.radioseven.se/128.pls", 1);
AddRadioStation("Dansbandskanalen", "http://www.guldkanalen.se/static/streamDBK/128MP3.pls", 1);
AddRadioStation("Din Gata", "http://sverigesradio.se/topsy/direkt/2576-hi-mp3.pls", 1);
AddRadioStation("Big R Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=73131", 1);
AddRadioStation("Radio AF", "http://webradio.af.lu.se:8000/listen.pls", 1);
AddRadioStation("Reggae141.com", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=85742", 1);
AddRadioStation("Hit Radio N1", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1277314", 1);
AddRadioStation("The 1920s Radio Network", "http://64.5.130.43/listen.pls", 1);
AddRadioStation("LAs HOT Country", "http://46.21.151.98:8000/listen.pls", 1);
AddRadioStation("Fade FM", "http://37.59.61.51/listen.pls", 1);
AddRadioStation("Grand Theft Auto San Andreas", "http://listen.radionomy.com/grand-theft-auto-san-andreas.m3u", 1);
AddRadioStation("Radio Off", "", 1);




    SetGameModeText("Free Mode, stunts, races etc.");
    ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
    ShowNameTags(1);
    SetNameTagDrawDistance(40.0);
    EnableStuntBonusForAll(0);
    DisableInteriorEnterExits();
    SetWeather(2);
    SetWorldTime(11);

    //UsePlayerPedAnims();
    //ManualVehicleEngineAndLights();
    //LimitGlobalChatRadius(300.0);

    ClassSel_InitTextDraws();

    // Player Class
    AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(282,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(283,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(284,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(285,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(286,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(287,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(288,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(265,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(266,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(267,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(268,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(42,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(74,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);

    AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(281,2385.7600,-1281.1403,24.4851,115.8818,0,0,0,0,0,0); //

    //AddVehicles
    AddStaticVehicle(600,2461.7532,-1656.6047,13.0208,90.0551,43,8); // car0
    AddStaticVehicle(439,-1766.9050,613.7802,28.0963,90.1726,79,78); // car1
    AddStaticVehicle(549,-1997.1497,701.7988,45.0459,0.2772,14,14); // car2
    AddStaticVehicle(480,-1997.1570,696.1385,45.1418,0.9108,127,8); // car3
    AddStaticVehicle(555,-1997.1226,690.4085,45.0497,0.4574,58,1); // car4
    AddStaticVehicle(533,-1997.1150,684.5101,45.0449,0.7273,7,1); // car5
    AddStaticVehicle(518,-1997.1124,678.0267,44.9521,1.0255,8,0); // car6
    AddStaticVehicle(542,-1997.1284,671.6221,44.1768,0.8896,45,92); // car7
    AddStaticVehicle(419,-1997.0178,664.9196,42.9615,0.3890,1,76); // car8
    AddStaticVehicle(502,-1944.3131,585.5934,35.0131,0.5602,36,88); // car9
    AddStaticVehicle(451,-1947.4026,585.6334,34.7825,0.5844,1,36); // car10
    AddStaticVehicle(506,-1950.4606,585.7036,34.8199,1.4687,126,52); // car 11
    AddStaticVehicle(477,-1938.2062,585.5255,34.8710,359.9006,65,1); // car12
    AddStaticVehicle(602,-1953.4102,585.8502,34.8846,359.4462,94,1); // car 13
    AddStaticVehicle(496,-1956.5023,585.9746,34.7861,0.1029,2,6); // car14
    AddStaticVehicle(402,-1959.3685,585.6564,34.9014,359.6677,86,110); // car15
    AddStaticVehicle(541,-1935.3408,585.7760,34.7403,0.0132,126,6); // car16
    AddStaticVehicle(415,-1932.3533,585.5296,34.8907,0.0465,119,1); // car17
    AddStaticVehicle(587,-1929.2599,586.0511,34.8377,359.7012,0,1); // car18
    AddStaticVehicle(504,-1926.2498,585.7791,34.9114,359.2645,45,29); // car19
    AddStaticVehicle(598,-1616.6740,651.2231,6.9347,0.8125,0,1); // car20
    AddStaticVehicle(601,-1628.8429,651.0104,6.9463,359.6806,1,1); // car21
    AddStaticVehicle(427,-1605.2008,651.7350,7.3193,359.6695,0,1); // car22
    AddStaticVehicle(596,-1599.6945,651.1352,6.9087,359.4665,0,1); // car23
    AddStaticVehicle(514,-1658.1969,449.0964,7.7671,213.6456,25,1); // car24
    AddStaticVehicle(432,-1450.3162,458.0264,7.1965,358.0674,43,0); // car25
    AddStaticVehicle(596,-1587.6300,651.6120,6.9087,358.3333,0,1); // car26
    AddStaticVehicle(596,-1581.8977,651.7803,6.9078,359.2933,0,1); // car27
    AddStaticVehicle(598,-1594.4235,673.0942,6.9332,179.1243,0,1); // car28
    AddStaticVehicle(598,-1600.0331,673.0317,6.9328,179.5085,0,1); // car29
    AddStaticVehicle(490,-1574.2876,714.2642,-5.1145,89.0129,0,0); // car30
    AddStaticVehicle(490,-1574.2661,710.3427,-5.1147,89.1375,0,0); // car31
    AddStaticVehicle(490,-1574.1755,706.1642,-5.1146,90.7530,0,0); // car32
    AddStaticVehicle(596,-1573.6791,722.1187,-5.5211,90.6117,0,1); // car33
    AddStaticVehicle(596,-1573.8575,730.6639,-5.5217,89.7573,0,1); // car34
    AddStaticVehicle(596,-1573.5385,734.4633,-5.5220,88.8792,0,1); // car35
    AddStaticVehicle(596,-1573.4248,739.0908,-5.5221,90.4690,0,1); // car36
    AddStaticVehicle(596,-1573.2230,742.5228,-5.5208,89.2028,0,1); // car37
    AddStaticVehicle(598,-1600.3463,749.7092,-5.4954,180.3100,0,1); // car38
    AddStaticVehicle(598,-1604.2474,749.6938,-5.4956,179.8932,0,1); // car39
    AddStaticVehicle(598,-1608.4534,749.6821,-5.4960,180.4397,0,1); // car40
    AddStaticVehicle(598,-1612.7340,749.6252,-5.4962,181.2642,0,1); // car41
    AddStaticVehicle(598,-1616.6920,749.7081,-5.4970,179.9954,0,1); // car41
    AddStaticVehicle(598,-1592.1154,749.6444,-5.4973,179.6934,0,1); // car43
    AddStaticVehicle(598,-1587.9971,749.8513,-5.4958,178.9971,0,1); // car44
    AddStaticVehicle(598,-1583.9622,749.8259,-5.4954,179.3184,0,1); // car45
    AddStaticVehicle(598,-1579.9960,749.7203,-5.4958,179.3284,0,1); // car46
    AddStaticVehicle(597,-1622.7053,649.7056,-5.4738,88.5598,0,1); // car47
    AddStaticVehicle(596,-1639.5427,674.1429,-5.5225,269.2240,0,1); // car48
    AddStaticVehicle(596,-1639.6805,682.0773,-5.5206,270.4482,0,1); // car49
    AddStaticVehicle(597,-1639.7576,686.4487,-5.4733,271.0222,0,1); // car50
    AddStaticVehicle(597,-1639.8285,669.9292,-5.4740,269.2921,0,1); // car51
    AddStaticVehicle(596,-1639.7863,666.1780,-5.5219,269.8799,0,1); // car52
    AddStaticVehicle(597,-1639.9882,661.8076,-5.4729,269.4359,0,1); // car53
    AddStaticVehicle(596,-1639.7858,657.7263,-5.5219,270.1051,0,1); // car54
    AddStaticVehicle(597,-1639.8157,653.7025,-5.4737,268.7205,0,1); // car55
    AddStaticVehicle(596,-1639.5710,649.8344,-5.5219,269.4172,0,1); // car56
    AddStaticVehicle(598,-1595.6241,694.0532,-5.4961,180.6208,0,1); // car57
    AddStaticVehicle(598,-1600.1334,693.9891,-5.4959,179.8698,0,1); // car58
    AddStaticVehicle(598,-1604.2416,693.9874,-5.4968,179.3441,0,1); // car59
    AddStaticVehicle(598,-1608.5326,694.0151,-5.4969,179.8332,0,1); // car60
    AddStaticVehicle(598,-1612.3291,694.0125,-5.4954,180.4067,0,1); // car61
    AddStaticVehicle(598,-1616.5938,694.0545,-5.4963,180.0018,0,1); // car62
    AddStaticVehicle(598,-1620.7970,694.0438,-5.4966,179.2025,0,1); // car63
    AddStaticVehicle(598,-1624.8109,693.9700,-5.4957,177.9268,0,1); // car64
    AddStaticVehicle(598,-1628.9708,693.9097,-5.4965,179.0654,0,1); // car65
    AddStaticVehicle(598,-1632.7097,693.9340,-5.4964,178.4928,0,1); // car66
    AddStaticVehicle(427,-1596.4033,678.2721,-5.1103,1.2281,0,1); // car67
    AddStaticVehicle(427,-1611.6322,733.2242,-5.1102,358.4313,0,1); // car68
    AddStaticVehicle(601,-1603.5253,733.0418,-5.4757,0.2952,1,1); // car69
    AddStaticVehicle(601,-1607.4572,732.7892,-5.4819,359.0168,1,1); // car70
    AddStaticVehicle(601,-1590.8903,718.8868,-5.4834,271.2448,1,1); // car71
    AddStaticVehicle(601,-1590.8268,714.7463,-5.4834,268.9313,1,1); // car72
    AddStaticVehicle(601,-1604.3324,676.1072,-5.4834,1.0470,1,1); // car73
    AddStaticVehicle(601,-1608.3807,675.8729,-5.4834,0.8872,1,1); // car74
    AddStaticVehicle(601,-1640.4934,690.0363,-5.4834,267.7431,1,1); // car75
    AddStaticVehicle(601,-1636.2931,694.5077,-5.4834,186.3782,1,1); // car76
    AddStaticVehicle(601,-1622.6899,657.6486,-5.4834,89.5577,1,1); // car77
    AddStaticVehicle(601,-1622.5437,661.3481,-5.4834,88.2688,1,1); // car78
    AddStaticVehicle(601,-1571.8530,745.8903,-5.4834,89.7020,1,1); // car79
    AddStaticVehicle(601,-1576.2029,749.3005,-5.4835,173.8618,1,1); // car80
    AddStaticVehicle(497,-1632.6996,671.5107,7.3643,268.2399,0,1); // car81
    AddStaticVehicle(449,-1857.2998,603.2500,35.4973,270.0000,1,74); // tram82
    
	







	//Objects
	CreateObject(13592, 1966.19921875, -2460.3994140625, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.0999755859, -2516, 40.299999237061, 0, 30, 0);
	CreateObject(18478, 1725.0999755859, -2515.8000488281, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(13592, 1966.1999511719, -2460.3999023438, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.0999755859, -2516, 40.299999237061, 0, 30, 0);
	CreateObject(18478, 1725.099609375, -2515.7998046875, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(5314, 1597, -1196, 343.10000610352, 0, 0, 90);
	CreateObject(615, 1566.5999755859, -1305.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.4000244141, -1304.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.1999511719, -1286.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.1999511719, -1283.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.3000488281, -1273.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566.1999511719, -1244, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1566, -1262.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582, -1274.5, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1565.6999511719, -1259.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.6999511719, -1244.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1567.5999755859, -1224.8000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1583.0999755859, -1224.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1568.5999755859, -1211.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1583, -1210.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1567.3000488281, -1195.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1581.8000488281, -1194.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1565.6999511719, -1182.8000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.8000488281, -1182.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1568.4000244141, -1168.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.9000244141, -1168.1999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1569.1999511719, -1153.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1584.5, -1158.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1573.9000244141, -1143.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1588.3000488281, -1149.9000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1577.4000244141, -1133.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1591, -1139.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1582.9000244141, -1123.5, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1597, -1131.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1590.4000244141, -1115.0999755859, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1602.6999511719, -1122.3000488281, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1597.1999511719, -1105, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1609, -1115.4000244141, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1606.5999755859, -1095.6999511719, 343.20001220703, 0, 0, 0);
	CreateObject(615, 1615.9000244141, -1106.5999755859, 343.20001220703, 0, 0, 0);
	CreateObject(13592, 1966.1999511719, -2460.3999023438, 21.60000038147, 0, 0, 0);
	CreateObject(13592, 1965.4000244141, -2466.6000976563, 21.200000762939, 0, 0, 0);
	CreateObject(634, 1892.5, -2414.1999511719, 12.5, 0, 0, 0);
	CreateObject(655, 1902.4000244141, -2409, 12.5, 0, 0, 0);
	CreateObject(671, 1914.5999755859, -2414.6999511719, 12.5, 0, 0, 0);
	CreateObject(680, 1910.6999511719, -2414.1000976563, 12.5, 0, 0, 0);
	CreateObject(687, 1911.5, -2414.6000976563, 12.5, 0, 0, 0);
	CreateObject(710, 1916.9000244141, -2417.3000488281, 28.10000038147, 0, 0, 0);
	CreateObject(777, 1876.0999755859, -2415, 12.60000038147, 0, 0, 0);
	CreateObject(18270, 1836.0999755859, -2403.3999023438, 19.39999961853, 0, 0, 0);
	CreateObject(1634, 1986.5999755859, -2344.1000976563, 17.60000038147, 0, 0, 300);
	CreateObject(1634, 1979.8000488281, -2348.1000976563, 13.800000190735, 0, 0, 300);
	CreateObject(1634, 2025.3000488281, -2332.6000976563, 24.5, 0, 0, 180);
	CreateObject(18478, 1856.099609375, -2516, 40.299999237061, 0, 29.998168945313, 0);
	CreateObject(18478, 1725.0999755859, -2515.8000488281, 75.400001525879, 0, 0, 0);
	CreateObject(13592, 1982.0999755859, -2528.3000488281, 22.60000038147, 0, 0, 0);
	CreateObject(13590, 2034.1999511719, -2526.1999511719, 13.5, 0, 0, 270);
	CreateObject(5754, 1586.0999755859, -2515.5, 82.800003051758, 0, 0, 90);
	CreateObject(6449, 1458.0999755859, -2499.8000488281, 96.199996948242, 0, 0, 90);
	CreateObject(17300, -1387.5999755859, -276.79998779297, 46.200000762939, 351.98559570313, 0, 315);
	CreateObject(17300, -1548, -463.29998779297, 83.800003051758, 1, 0, 315);
	CreateObject(17300, -1699.8000488281, -639.90002441406, 113, 355, 0, 315);
	CreateObject(18483, -1803.5999755859, -760, 130.89999389648, 0, 0, 48);
	CreateObject(1634, -1297.5, -176, 14.39999961853, 0, 0, 315);
	CreateObject(1634, -1300.5, -173.10000610352, 14.39999961853, 0, 0, 315);
	CreateObject(5112, -970.40002441406, 514.90002441406, 9.6999998092651, 0, 0, 40);
	CreateObject(5112, -858.5, 617.29998779297, 10, 0, 0, 45);
	CreateObject(1632, -786.79998779297, 695.20001220703, 17.39999961853, 0, 0, 135);
	CreateObject(4710, -1178, 424.5, 13.39999961853, 0, 0, 160);
	CreateObject(4148, -1283.3000488281, 470.70001220703, 6.3000001907349, 353, 0, 70);
	CreateObject(8040, 1648.1999511719, -1064.6999511719, 343.89999389648, 0, 0, 225);
	CreateObject(4150, 1576.6999511719, -1368.4000244141, 343.10000610352, 0, 0, 0);
	CreateObject(4150, 1576.6999511719, -1484.4000244141, 322.60000610352, 20, 0, 0);
	CreateObject(4150, 1576.9000244141, -1572.8000488281, 290.5, 20, 0, 0);
	CreateObject(4150, 1577.0999755859, -1681.5999755859, 245.39999389648, 25, 0, 0);
	CreateObject(4150, 1577.0999755859, -1787.8000488281, 194.73950195313, 26, 0, 0);
	CreateObject(13641, 1578.5, -1845.8000488281, 169.80000305176, 0, 0, 270);
	CreateObject(13641, 1572.0999755859, -1845.9000244141, 169.80000305176, 0, 0, 270);
	CreateObject(13641, 1478.5999755859, -2567.3999023438, 14.5, 0, 0, 0);
	CreateObject(13641, 1477.5999755859, -2552.5, 12.5, 0, 0, 0);
	CreateObject(13640, 1511.3000488281, -2533.6999511719, 13.60000038147, 0, 0, 0);
	CreateObject(13592, 1543.9000244141, -2529.5, 22.700000762939, 0, 0, 5);
	CreateObject(1634, 1775.5999755859, -2569.6000976563, 13.800000190735, 0, 0, 0);
	CreateObject(1634, 1774.5, -2518.8999023438, 13.800000190735, 0, 0, 180);
	CreateObject(3567, 1777, -2455.8000488281, 13.39999961853, 0, 0, 0);
	CreateObject(12932, 1802.5999755859, -2436.6999511719, 15.89999961853, 0, 0, 0);
	CreateObject(7515, 1727.8000488281, -2459.1999511719, 18.5, 0, 0, 0);
	CreateObject(3625, 1557.9000244141, -2460.8000488281, 15.39999961853, 0, 0, 0);
	CreateObject(8302, 1593.5, -2445.3000488281, 14.60000038147, 0, 0, 0);
	CreateObject(8040, 1893.0999755859, -2283.8999023438, 13.5, 0, 0, 0);
	CreateObject(13666, 1929.6999511719, -2343.6999511719, 18.299999237061, 0, 0, 0);
	CreateObject(9076, 1889.4000244141, -2675, 43.400001525879, 0, 0, 270);
	CreateObject(16778, 1896.9000244141, -2449.3999023438, 12.5, 0, 0, 0);
	CreateObject(16776, 1936.5, -2428.8000488281, 12.5, 0, 0, 0);
	CreateObject(13562, 1810.8000488281, -2646.3999023438, 24.10000038147, 0, 0, 0);
	CreateObject(13667, 1841.5, -2641.6999511719, 38.599998474121, 0, 0, 95);
	CreateObject(14608, 1823.5, -2641.3000488281, 27.60000038147, 0, 0, 325);
	CreateObject(16776, 1754.3000488281, -2647.3999023438, 25.39999961853, 0, 0, 180);
	CreateObject(1634, 1970.5999755859, -2428.3999023438, 13.800000190735, 0, 0, 90);
	CreateObject(18483, 2476.5, -1659.0999755859, 12, 0, 329.13635253906, 0);
	CreateObject(18483, 2541.6999511719, -1659, 31, 0, 358.17993164063, 0);
	CreateObject(18483, 2575.1999511719, -1659, 32.099998474121, 0, 330, 0);
	CreateObject(18483, 2605.3999023438, -1659, 49.5, 0, 330, 0);
	CreateObject(18483, 2624.8000488281, -1659.0999755859, 60.700000762939, 0, 330, 0);
	CreateObject(18483, 2655.1000976563, -1659.4000244141, 78.099998474121, 0, 330, 0);
	CreateObject(17300, 2809.8994140625, -1658.69921875, 102.80000305176, 3.8397216796875, 0, 85.995483398438);
	CreateObject(13139, 172.80000305176, 109.5, 492.70001220703, 0, 0, 0);
	CreateObject(17062, 3026.1000976563, -1656.5999755859, 163.5, 331.5, 0, 87);
	CreateObject(8420, 3161.1999511719, -1644.5999755859, 217.69999694824, 346, 0, 19);
	CreateObject(13641, 2369.3999023438, -1658.8000488281, 12.39999961853, 0, 0, 178);

    // SPECIAL
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

    // LAS VENTURAS
     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

    // SAN FIERRO
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

    // LOS SANTOS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

    // OTHER AREAS
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");


    printf("Total vehicles from files: %d",total_vehicles_from_files);

    return 1;
}

//----------------------------------------------------------


public OnPlayerUpdate(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0;
    if(IsPlayerNPC(playerid)) return 1;

    // changing cities by inputs
    if( !gPlayerHasCitySelected[playerid] &&
        GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
        ClassSel_HandleCitySelection(playerid);
        return 1;
    }

    // No weapons in interiors
    if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
        SetPlayerArmedWeapon(playerid,0); // fists
        return 0; // no syncing until they change their weapon
    }

    // Don't allow minigun
    if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
        Kick(playerid);
        return 0;
    }

    /* No jetpacks allowed
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
        Kick(playerid);
        return 0;
    }*/

    /* For testing animations
    new msg[128+1];
    new animlib[32+1];
    new animname[32+1];

    thisanimid = GetPlayerAnimationIndex(playerid);
    if(lastanimid != thisanimid)
    {
        GetAnimationName(thisanimid,animlib,32,animname,32);
        format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname);
        lastanimid = thisanimid;
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }*/

    return 1;
}

//----------------------------------------------------------

enum
{
    E_STREAMER_ATTACHED_OBJECT,
    E_STREAMER_ATTACHED_PLAYER,
    E_STREAMER_ATTACHED_VEHICLE,
    E_STREAMER_ATTACH_OFFSET_X,
    E_STREAMER_ATTACH_OFFSET_Y,
    E_STREAMER_ATTACH_OFFSET_Z,
    E_STREAMER_ATTACH_R_X,
    E_STREAMER_ATTACH_R_Y,
    E_STREAMER_ATTACH_R_Z,
    E_STREAMER_ATTACH_X,
    E_STREAMER_ATTACH_Y,
    E_STREAMER_ATTACH_Z,
    E_STREAMER_COLOR,
    E_STREAMER_DRAW_DISTANCE,
    E_STREAMER_EXTRA_ID,
    E_STREAMER_INTERIOR_ID,
    E_STREAMER_MAX_X,
    E_STREAMER_MAX_Y,
    E_STREAMER_MAX_Z,
    E_STREAMER_MIN_X,
    E_STREAMER_MIN_Y,
    E_STREAMER_MIN_Z,
    E_STREAMER_MODEL_ID,
    E_STREAMER_MOVE_R_X,
    E_STREAMER_MOVE_R_Y,
    E_STREAMER_MOVE_R_Z,
    E_STREAMER_MOVE_SPEED,
    E_STREAMER_MOVE_X,
    E_STREAMER_MOVE_Y,
    E_STREAMER_MOVE_Z,
    E_STREAMER_NEXT_X,
    E_STREAMER_NEXT_Y,
    E_STREAMER_NEXT_Z,
    E_STREAMER_PLAYER_ID,
    E_STREAMER_R_X,
    E_STREAMER_R_Y,
    E_STREAMER_R_Z,
    E_STREAMER_SIZE,
    E_STREAMER_STREAM_DISTANCE,
    E_STREAMER_STYLE,
    E_STREAMER_TEST_LOS,
    E_STREAMER_TYPE,
    E_STREAMER_WORLD_ID,
    E_STREAMER_X,
    E_STREAMER_Y,
    E_STREAMER_Z
}

//----------------------------------------------------------

CMD:healme(playerid, params[])
{
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, 0xFFFF00AA, "Julius95Bot: You have successfully healed yourself!");
    SendClientMessage(playerid, 0xFFFF00AA, "Julius95Bot: Don't abuse this command for example during fights or you may get kicked and banned!");
    return 1;
}

CMD:fix(playerid, params[])
{
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "SpyBot: You are not in a vehicle!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, 0xFFFFFFFF, "SpyBot: Your vehicle has been successfully repaired!");
    return 1;
}
//----------------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        new veh = GetPlayerVehicleID(playerid);
        AddVehicleComponent(veh,1010);
        return 1;
    }
    return 1;
}

//----------------------------------------------------------

public OnPlayerText(playerid, text[])
{
        new name[MAX_PLAYER_NAME], ircMsg[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
        IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
        return 1;
}

//----------------------------------------------------------

public IRC_OnConnect(botid, ip[], port)
{
        printf("*** IRC_OnConnect: Bot ID %d connected to %s:%d", botid, ip, port);
        // Join the channel
        IRC_JoinChannel(botid, IRC_CHANNEL);
        // Add the bot to the group
        IRC_AddToGroup(groupID, botid);
new str[60];
format(str, 60, "nickserv identify %s", IRC_PASSWORD);
IRC_SendRaw(botid, str);
		return 1;

}

/*
        This callback is executed whenever a current connection is closed. The
        plugin may automatically attempt to reconnect per user settings. IRC_Quit
        may be called at any time to stop the reconnection process.
*/

public IRC_OnDisconnect(botid, ip[], port, reason[])
{


		printf("*** IRC_OnDisconnect: Bot ID %d disconnected from %s:%d (%s)", botid, ip, port, reason);
        // Remove the bot from the group
        IRC_RemoveFromGroup(groupID, botid);
        return 1;
}

/*
        This callback is executed whenever a connection attempt begins. IRC_Quit may
        be called at any time to stop the reconnection process.
*/

public IRC_OnConnectAttempt(botid, ip[], port)
{
        printf("*** IRC_OnConnectAttempt: Bot ID %d attempting to connect to %s:%d...", botid, ip, port);
	    return 1;
}

/*
        This callback is executed whenever a connection attempt fails. IRC_Quit may
        be called at any time to stop the reconnection process.
*/

public IRC_OnConnectAttemptFail(botid, ip[], port, reason[])
{
        printf("*** IRC_OnConnectAttemptFail: Bot ID %d failed to connect to %s:%d (%s)", botid, ip, port, reason);
        return 1;
}

/*
        This callback is executed whenever a bot joins a channel.
*/

public IRC_OnJoinChannel(botid, channel[])
{
        printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s", botid, channel);
        return 1;
}

/*
        This callback is executed whenevever a bot leaves a channel.
*/

public IRC_OnLeaveChannel(botid, channel[], message[])
{
        printf("*** IRC_OnLeaveChannel: Bot ID %d left channel %s (%s)", botid, channel, message);
        return 1;
}

/*
        This callback is executed whenevever a bot is invited to a channel.
*/

public IRC_OnInvitedToChannel(botid, channel[], invitinguser[], invitinghost[])
{
        printf("*** IRC_OnInvitedToChannel: Bot ID %d invited to channel %s by %s (%s)", botid, channel, invitinguser, invitinghost);
        IRC_JoinChannel(botid, channel);
        return 1;
}

/*
        This callback is executed whenevever a bot is kicked from a channel. If the
        bot cannot immediately rejoin the channel (in the event, for example, that
        the bot is kicked and then banned), you might want to set up a timer here
        for rejoin attempts.
*/

public IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[])
{
        printf("*** IRC_OnKickedFromChannel: Bot ID %d kicked by %s (%s) from channel %s (%s)", botid, oppeduser, oppedhost, channel, message);
        IRC_JoinChannel(botid, channel);
        return 1;
}

public IRC_OnUserDisconnect(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserDisconnect (Bot ID %d): User %s (%s) disconnected (%s)", botid, user, host, message);
        return 1;
}

public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
        printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s", botid, user, host, channel);
        return 1;
}

public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
{
        printf("*** IRC_OnUserLeaveChannel (Bot ID %d): User %s (%s) left channel %s (%s)", botid, user, host, channel, message);
        return 1;
}

public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
{
        printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): User %s kicked by %s (%s) from channel %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
}

public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
        printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his/her nick to %s", botid, oldnick, host, newnick);
        return 1;
}

public IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[])
{
        printf("*** IRC_OnUserSetChannelMode (Bot ID %d): User %s (%s) on %s set mode: %s", botid, user, host, channel, mode);
        return 1;
}

public IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[])
{
        printf("*** IRC_OnUserSetChannelTopic (Bot ID %d): User %s (%s) on %s set topic: %s", botid, user, host, channel, topic);
        return 1;
}

public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
        printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
        // Someone sent the first bot a private message
        if (!strcmp(recipient, BOT_1_NICKNAME))
        {
                IRC_Say(botid, user, "You sent me a PM!");
        }
        return 1;
}

public IRC_OnUserNotice(botid, recipient[], user[], host[], message[])
{
        printf("*** IRC_OnUserNotice (Bot ID %d): User %s (%s) sent notice to %s: %s", botid, user, host, recipient, message);
        // Someone sent the second bot a notice (probably a network service)
        if (!strcmp(recipient, BOT_2_NICKNAME))
        {
                IRC_Notice(botid, user, "You sent me a notice!");
        }
        return 1;
}

public IRC_OnUserRequestCTCP(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserRequestCTCP (Bot ID %d): User %s (%s) sent CTCP request: %s", botid, user, host, message);
        // Someone sent a CTCP VERSION request
        if (!strcmp(message, "VERSION"))
        {
                IRC_ReplyCTCP(botid, user, "VERSION SA-MP IRC Plugin v" #PLUGIN_VERSION "");
        }
        return 1;
}

public IRC_OnUserReplyCTCP(botid, user[], host[], message[])
{
        printf("*** IRC_OnUserReplyCTCP (Bot ID %d): User %s (%s) sent CTCP reply: %s", botid, user, host, message);
        return 1;
}

/*
        This callback is useful for logging, debugging, or catching error messages
        sent by the IRC server.
*/

public IRC_OnReceiveRaw(botid, message[])
{
        new File:file;
        if (!fexist("irc_log.txt"))
        {
                file = fopen("irc_log.txt", io_write);
        }
        else
        {
                file = fopen("irc_log.txt", io_append);
        }
        if (file)
        {
                fwrite(file, message);
                fwrite(file, "\r\n");
                fclose(file);
        }
        return 1;
}

/*
        Some examples of channel commands are here. You can add more very easily;
        their implementation is identical to that of ZeeX's zcmd.
*/

IRCCMD:say(botid, channel[], user[], host[], params[])
{
        // Check if the user has at least voice in the channel
        if (IRC_IsVoice(botid, channel, user))
        {
                // Check if the user entered any text
                if (!isnull(params))
                {
                        new msg[128];
                        // Echo the formatted message
                        format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
                        SendClientMessageToAll(0x0000FFFF, msg);
                }
        }
        return 1;
}

IRCCMD:kick(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least a halfop in the channel
        if (IRC_IsHalfop(botid, channel, user))
        {
                new playerid, reason[64];
                // Check if the user at least entered a player ID
                if (sscanf(params, "dS(No reason)[64]", playerid, reason))
                {
                        return 1;
                }
                // Check if the player is connected
                if (IsPlayerConnected(playerid))
                {
                        // Echo the formatted message
                        new msg[128], name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(msg, sizeof(msg), "02*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
                        SendClientMessageToAll(0x0000FFFF, msg);
                        // Kick the player
                        Kick(playerid);
                }
        }
        return 1;
}

IRCCMD:ban(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least an op in the channel
        if (IRC_IsOp(botid, channel, user))
        {
                new playerid, reason[64];
                // Check if the user at least entered a player ID
                if (sscanf(params, "dS(No reason)[64]", playerid, reason))
                {
                        return 1;
                }
                // Check if the player is connected
                if (IsPlayerConnected(playerid))
                {
                        // Echo the formatted message
                        new msg[128], name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (%s)", name, user, reason);
                        IRC_GroupSay(groupID, channel, msg);
                        format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", name, user, reason);
                        SendClientMessageToAll(0x0000FFFF, msg);
                        // Ban the player
                        BanEx(playerid, reason);
                }
        }
        return 1;
}

IRCCMD:rcon(botid, channel[], user[], host[], params[])
{
        // Check if the user is at least an op in the channel
        if (IRC_IsOp(botid, channel, user))
        {
                // Check if the user entered any text
                if (!isnull(params))
                {
                        // Check if the user did not enter any invalid commands
                        if (strcmp(params, "exit", true) != 0 && strfind(params, "loadfs irc", true) == -1)
                        {
                                // Echo the formatted message
                                new msg[128];
                                format(msg, sizeof(msg), "RCON command %s has been executed.", params);
                                IRC_GroupSay(groupID, channel, msg);
                                // Send the command
                                SendRconCommand(params);
                        }
                }
        }
        return 1;
}
Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(69) : warning 201: redefinition of constant/macro (symbol "IRC_SERVER")
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(70) : warning 201: redefinition of constant/macro (symbol "IRC_PORT")
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(103) : error 001: expected token: "{", but found "="
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(103 -- 107) : error 008: must be a constant expression; assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(112) : error 010: invalid function or declaration
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(114) : error 021: symbol already defined: "VehicleInfo"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(130) : error 017: undefined symbol "Temp"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 017: undefined symbol "onsys"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : warning 215: expression has no effect
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 001: expected token: ";", but found "]"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : error 029: invalid expression, assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(131) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Reply
#10

You don't expect anyone to go through all your code just to look for an error that may be there somewhere?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)