#1

I hope this is the right place to ask for IRC echo.

What I want is simply that you could talk ingame to my irc chat and from the irc to the game.

https://sampforum.blast.hk/showthread.php?tid=241674

https://sampforum.blast.hk/showthread.php?tid=98803
I've followed those tutoriuals.

irc.pwn and irc.amx is located in the filterscript folder.
I've edited all the settings for the irc chat and server.

IRC.inc is located in the include pawno folder

and I have the plugins

The irc.pwn file

pawn Код:
#include <irc>
// sscanf2 include from the sscanf plugin
#include <sscanf2>

// Name that everyone will see
#define BOT_1_NICKNAME "BotA"
// Name that will only be visible in a whois
#define BOT_1_REALNAME "SA-MP Bot"
// Name that will be in front of the hostname (username@hostname)
#define BOT_1_USERNAME "bot"

#define BOT_2_NICKNAME "BotB"
#define BOT_2_REALNAME "SA-MP Bot"
#define BOT_2_USERNAME "bot"

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

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

#define PLUGIN_VERSION "1.4.2"

new gBotID[MAX_BOTS], gGroupID;

/*
    When the filterscript is loaded, two bots will connect and a group will be
    created for them.
*/


public OnFilterScriptInit()
{
    // Connect the first bot
    gBotID[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(gBotID[0], E_IRC_CONNECT_DELAY, 20);
    // Connect the second bot
    gBotID[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(gBotID[1], E_IRC_CONNECT_DELAY, 30);
    // Create a group (the bots will be added to it upon connect)
    gGroupID = IRC_CreateGroup();
}

/*
    When the filterscript is unloaded, the bots will disconnect, and the group
    will be destroyed.
*/


public OnFilterScriptExit()
{
    // Disconnect the first bot
    IRC_Quit(gBotID[0], "Filterscript exiting");
    // Disconnect the second bot
    IRC_Quit(gBotID[1], "Filterscript exiting");
    // Destroy the group
    IRC_DestroyGroup(gGroupID);
}

/*
    The standard SA-MP callbacks are below. We will echo a few of them to the
    IRC channel.
*/


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(gGroupID, IRC_CHANNEL, joinMsg);
    return 1;
}

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(gGroupID, IRC_CHANNEL, leaveMsg);
    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(gGroupID, IRC_CHANNEL, msg);
    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(gGroupID, IRC_CHANNEL, ircMsg);
    return 1;
}

/*
    The IRC callbacks are below. Many of these are simply derived from parsed
    raw messages received from the IRC server. They can be used to inform the
    bot of new activity in any of the channels it has joined.
*/


/*
    This callback is executed whenever a bot successfully connects to an IRC
    server.
*/


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(gGroupID, botid);
    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(gGroupID, 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);
    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.
*/
irc.inc

Код:
/*
    SA-MP IRC Plugin v1.4.2
    Copyright © 2011 Incognito

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <a_samp>
#include <irc>
// Enumerator

enum
{
	E_IRC_CONNECT_ATTEMPTS,
	E_IRC_CONNECT_DELAY,
	E_IRC_CONNECT_TIMEOUT
}

// Natives

native IRC_Connect(const server[], port, const nickname[], const realname[], const username[], bool:ssl = false, localip[] = "");
native IRC_Quit(botid, const message[] = "");
native IRC_JoinChannel(botid, const channel[], const key[] = "");
native IRC_PartChannel(botid, const channel[], const message[] = "");
native IRC_ChangeNick(botid, const nick[]);
native IRC_SetMode(botid, const target[], const mode[]);
native IRC_Say(botid, const target[], const message[]);
native IRC_Notice(botid, const target[], const message[]);
native IRC_IsUserOnChannel(botid, const channel[], const user[]);
native IRC_InviteUser(botid, const channel[], const user[]);
native IRC_KickUser(botid, const channel[], const user[], const message[] = "");
native IRC_GetUserChannelMode(botid, const channel[], const user[], dest[]);
native IRC_GetChannelUserList(botid, const channel[], dest[], maxlength = sizeof dest);
native IRC_SetChannelTopic(botid, const channel[], const topic[]);
native IRC_RequestCTCP(botid, const user[], const message[]);
native IRC_ReplyCTCP(botid, const user[], const message[]);
native IRC_SendRaw(botid, const message[]);
native IRC_CreateGroup();
native IRC_DestroyGroup(groupid);
native IRC_AddToGroup(groupid, botid);
native IRC_RemoveFromGroup(groupid, botid);
native IRC_GroupSay(groupid, const target[], const message[]);
native IRC_GroupNotice(groupid, const target[], const message[]);
native IRC_SetIntData(botid, data, value);

// Callbacks

forward IRC_OnConnect(botid, ip[], port);
forward IRC_OnDisconnect(botid, ip[], port, reason[]);
forward IRC_OnConnectAttempt(botid, ip[], port);
forward IRC_OnConnectAttemptFail(botid, ip[], port, reason[]);
forward IRC_OnJoinChannel(botid, channel[]);
forward IRC_OnLeaveChannel(botid, channel[], message[]);
forward IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[]);
forward IRC_OnUserDisconnect(botid, user[], host[], message[]);
forward IRC_OnUserJoinChannel(botid, channel[], user[], host[]);
forward IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[]);
forward IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[]);
forward IRC_OnUserNickChange(botid, oldnick[], newnick[], host[]);
forward IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[]);
forward IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[]);
forward IRC_OnUserSay(botid, recipient[], user[], host[], message[]);
forward IRC_OnUserNotice(botid, recipient[], user[], host[], message[]);
forward IRC_OnUserRequestCTCP(botid, user[], host[], message[]);
forward IRC_OnUserReplyCTCP(botid, user[], host[], message[]);
forward IRC_OnReceiveRaw(botid, message[]);

// Stock Functions

stock IRC_IsVoice(botid, channel[], user[])
{
	new mode[2];
	IRC_GetUserChannelMode(botid, channel, user, mode);
	switch (mode[0])
	{
		case '+', '%', '@', '&', '!', '*', '~', '.':
		{
			return 1;
		}
	}
	return 0;
}

stock IRC_IsHalfop(botid, channel[], user[])
{
	new mode[2];
	IRC_GetUserChannelMode(botid, channel, user, mode);
	switch (mode[0])
	{
		case '%', '@', '&', '!', '*', '~', '.':
		{
			return 1;
	
		}
	}
	return 0;
}

stock IRC_IsOp(botid, channel[], user[])
{
	new mode[2];
	IRC_GetUserChannelMode(botid, channel, user, mode);
	switch (mode[0])
	{
		case '@', '&', '!', '*', '~', '.':
		{
			return 1;
	
		}
	}
	return 0;
}

stock IRC_IsAdmin(botid, channel[], user[])
{
	new mode[2];
	IRC_GetUserChannelMode(botid, channel, user, mode);
	switch (mode[0])
	{
		case '&', '!', '*', '~', '.':
		{
			return 1;
	
		}
	}
	return 0;
}

stock IRC_IsOwner(botid, channel[], user[])
{
	new mode[2];
	IRC_GetUserChannelMode(botid, channel, user, mode);
	switch (mode[0])
	{
		case '~', '.':
		{
			return 1;
	
		}
	}
	return 0;
}

// Command system for users in IRC channels
// Slightly modified zcmd by Zeex

#define CHANNEL_PREFIX '#'
#define COMMAND_PREFIX '!'

#define IRCCMD:%1(%2) \
	forward irccmd_%1(%2); \
	public irccmd_%1(%2)

#define irccmd(%1,%2,%3,%4,%5,%6) \
	IRCCMD:%1(%2, %3, %4, %5, %6)

#if !defined isnull
	#define isnull(%1) \
		((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif

static bool:IRC_g_OUS = false;

public OnFilterScriptInit()
{
	IRC_g_OUS = funcidx("IRC_OUS") != -1;
	if (funcidx("IRC_OnFilterScriptInit") != -1)
	{
		return CallLocalFunction("IRC_OnFilterScriptInit", "");
	}
	return 1;
}

#if defined _ALS_OnFilterScriptInit
	#undef OnFilterScriptInit
#else
	#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit IRC_OnFilterScriptInit

forward IRC_OnFilterScriptInit();

public OnGameModeInit()
{
	IRC_g_OUS = funcidx("IRC_OUS") != -1;
	if (funcidx("IRC_OnGameModeInit") != -1)
	{
		return CallLocalFunction("IRC_OnGameModeInit", "");
	}
	return 1;
}

#if defined _ALS_OnGameModeInit
	#undef OnGameModeInit
#else
	#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit IRC_OnGameModeInit

forward IRC_OnGameModeInit();

public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
	if (recipient[0] == CHANNEL_PREFIX && message[0] == COMMAND_PREFIX)
	{
		new function[32], pos = 0;
		while (message[++pos] > ' ')
		{
			function[pos - 1] = tolower(message[pos]);
		} 
		format(function, sizeof(function), "irccmd_%s", function);
		while (message[pos] == ' ')
		{
			pos++;
		}
		if (!message[pos])
		{
			CallLocalFunction(function, "dssss", botid, recipient, user, host, "\1");
		}
		else
		{
			CallLocalFunction(function, "dssss", botid, recipient, user, host, message[pos]);
		}
	}
	if (IRC_g_OUS)
	{
		return CallLocalFunction("IRC_OUS", "dssss", botid, recipient, user, host, message);
	}
	return 1;
}

#if defined _ALS_IRC_OnUserSay
	#undef IRC_OnUserSay
#else
	#define _ALS_IRC_OnUserSay
#endif
#define IRC_OnUserSay IRC_OUS

forward IRC_OUS(botid, recipient[], user[], host[], message[]);
My gamemode look like this. I don't get it. Why it won't work
I need as much help as possible
pawn Код:
//----------------------------------------------------------
//
//  GRAND LARCENY  1.0
//  A freeroam gamemode for SA-MP 0.3
//
//----------------------------------------------------------

#include <irc>
#include <a_samp>
#include <core>
#include <float>
#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

new total_vehicles_from_files=0;

// 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;

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

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

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


public OnPlayerConnect(playerid)
{

    GameTextForPlayer(playerid,"~w~Julius95's freemode",3000,4);
    SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}J{FFFFFF}ulius {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 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()
{
//AddRadioStation("Radio Julius", http://78.72.181.195:8000/listen.pls, m = 1);

#define BOT_1_NICKNAME "SpyBot1"// This is the name that everyone will see
#define BOT_1_REALNAME "SpyBot1"// This is the name that will only be visible in a whois
#define BOT_1_USERNAME "SpyBot1"// This will be in front of the hostname (username@hostname)
#define BOT_2_NICKNAME "SpyBot2"
#define BOT_2_REALNAME "SpyBot2"
#define BOT_2_USERNAME "SpyBot2"
#define IRC_SERVER "irc.geekshed.net"
#define IRC_PORT 6667
#define IRC_CHANNEL "#Julius95"
#define IRC_ADMINCHANNEL "#Julius95"

#define MAX_BOTS 2// Maximum number of bots in the filterscript
#define MAX_SERVER_PLAYERS MAX_PLAYERS// Maximum number of players in the server

new gBotID[MAX_BOTS], gGroupID, gGroupID2;

    SetGameModeText("Freemode");
    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);

    // 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;
}

//----------------------------------------------------------
Reply
#2

Can you show me the logs?
Reply
#3

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, ©2005-2012 SA-MP Team

[:2012:29::22:59:01] 
[:2012:29::22:59:01] Server Plugins
[:2012:29::22:59:01] --------------
[:2012:29::22:59:01]  Loading plugin: irc
[:2012:29::22:59:01] 

*** IRC Plugin v1.4.2 by Incognito loaded ***

[:2012:29::22:59:01]   Loaded.
[:2012:29::22:59:01]  Loading plugin: FileManager.dll
[:2012:29::22:59:01] ******************
[:2012:29::22:59:01] ** FILE MANAGER **
[:2012:29::22:59:01] **    Loaded    **
[:2012:29::22:59:01] ** Version 1.4 **
[:2012:29::22:59:01] ******************
[:2012:29::22:59:01]   Loaded.
[:2012:29::22:59:01]  Loading plugin: FileManager2.dll
[:2012:29::22:59:01] ******************
[:2012:29::22:59:01] ** FILE MANAGER **
[:2012:29::22:59:01] **    Loaded    **
[:2012:29::22:59:01] ** Version 1.1 **
[:2012:29::22:59:01] ******************
[:2012:29::22:59:01]   Loaded.
[:2012:29::22:59:01]  Loaded 3 plugins.

[:2012:29::22:59:01] 
[:2012:29::22:59:01] Filterscripts
[:2012:29::22:59:01] ---------------
[:2012:29::22:59:01]   Loading filterscript 'gl_actions.amx'...
[:2012:29::22:59:01]   Loading filterscript 'gl_property.amx'...
[:2012:29::22:59:01] 
-----------------------------------
[:2012:29::22:59:01] Grand Larceny Property Filterscript		
[:2012:29::22:59:01] -----------------------------------

[:2012:29::22:59:01]   Loading filterscript 'gl_realtime.amx'...
[:2012:29::22:59:01]   Loading filterscript 'gl_mapicon.amx'...
[:2012:29::22:59:01]   Loading filterscript 'ls_elevator.amx'...
[:2012:29::22:59:01]   Loading filterscript 'test_cmds.amx'...
[:2012:29::22:59:01]   Loading filterscript 'ls_mall.amx'...
[:2012:29::22:59:01]   Loading filterscript 'attachments.amx'...
[:2012:29::22:59:01]   Loading filterscript 'irc.amx'...
[:2012:29::22:59:01]   Loading filterscript 'knpc.amx'...
[:2012:29::22:59:01] 
----------------------------------
[:2012:29::22:59:01] InGame NPC editor by Kurence loaded!
[:2012:29::22:59:01] ----------------------------------

[:2012:29::22:59:14] Incoming connection: 127.0.0.1:55911
[:2012:29::22:59:14] Incoming connection: 127.0.0.1:55912
[:2012:29::22:59:15] Incoming connection: 127.0.0.1:55913
[:2012:29::22:59:19] Incoming connection: 127.0.0.1:55914
[:2012:29::22:59:19] Incoming connection: 127.0.0.1:55915
[:2012:29::22:59:20] Incoming connection: 127.0.0.1:55916
[:2012:29::22:59:21] Incoming connection: 127.0.0.1:55917
[:2012:29::22:59:22] Incoming connection: 127.0.0.1:55918
[:2012:29::22:59:22] Incoming connection: 127.0.0.1:55919
[:2012:29::22:59:27] Incoming connection: 127.0.0.1:62037
[:2012:29::22:59:28] Incoming connection: 127.0.0.1:62038
[:2012:29::22:59:28] Incoming connection: 127.0.0.1:63921
[:2012:29::22:59:29] Incoming connection: 127.0.0.1:63922
[:2012:29::22:59:29] Incoming connection: 127.0.0.1:63923
[:2012:29::22:59:30] Incoming connection: 127.0.0.1:63924
[:2012:29::22:59:32] Incoming connection: 127.0.0.1:63926
[:2012:29::22:59:32] Incoming connection: 127.0.0.1:63925
[:2012:29::22:59:34] Incoming connection: 127.0.0.1:63927
[:2012:29::22:59:34] Incoming connection: 127.0.0.1:63928
[:2012:29::22:59:35] Incoming connection: 127.0.0.1:63929
[:2012:29::22:59:38] Incoming connection: 127.0.0.1:63930
[:2012:29::22:59:39] Incoming connection: 127.0.0.1:63931
[:2012:29::22:59:41] Incoming connection: 127.0.0.1:63932
[:2012:29::22:59:42] Incoming connection: 127.0.0.1:63933
[:2012:29::22:59:43] Incoming connection: 127.0.0.1:63934
[:2012:29::22:59:45] Incoming connection: 127.0.0.1:50778
[:2012:29::22:59:47] Incoming connection: 127.0.0.1:64552
[:2012:29::22:59:48] Incoming connection: 127.0.0.1:64553
[:2012:29::22:59:48] Incoming connection: 127.0.0.1:64555
[:2012:29::22:59:49] Incoming connection: 127.0.0.1:64554
[:2012:29::22:59:49] Incoming connection: 127.0.0.1:64556
[:2012:29::22:59:49] Incoming connection: 127.0.0.1:64557
[:2012:29::22:59:50] Incoming connection: 127.0.0.1:64558
[:2012:29::22:59:51] Incoming connection: 127.0.0.1:64559
[:2012:29::22:59:52] Incoming connection: 127.0.0.1:64560
[:2012:29::22:59:58] Incoming connection: 127.0.0.1:64561
[:2012:29::22:59:58] Incoming connection: 127.0.0.1:64562
[:2012:29::22:59:59] Incoming connection: 127.0.0.1:64563
[:2012:29::23:00:00] Incoming connection: 127.0.0.1:64564
[:2012:29::23:00:00] Incoming connection: 127.0.0.1:64565
[:2012:29::23:00:01] Incoming connection: 127.0.0.1:64567
[:2012:29::23:00:01] Incoming connection: 127.0.0.1:64566
[:2012:29::23:00:02] Incoming connection: 127.0.0.1:64568
[:2012:29::23:00:02] Incoming connection: 127.0.0.1:64569
[:2012:29::23:00:02] Incoming connection: 127.0.0.1:64570
[:2012:29::23:00:03] Incoming connection: 127.0.0.1:64571
[:2012:29::23:00:06] Incoming connection: 127.0.0.1:64572
[:2012:29::23:00:06] Incoming connection: 127.0.0.1:64573
[:2012:29::23:00:07] Incoming connection: 127.0.0.1:64574
[:2012:29::23:00:07] Incoming connection: 127.0.0.1:64575
[:2012:29::23:00:10] Incoming connection: 127.0.0.1:64576
[:2012:29::23:00:13] Incoming connection: 127.0.0.1:64577
[:2012:29::23:00:13] Incoming connection: 127.0.0.1:64578
[:2012:29::23:00:16] Incoming connection: 127.0.0.1:64579
[:2012:29::23:00:16] Incoming connection: 127.0.0.1:64580
[:2012:29::23:00:17] Incoming connection: 127.0.0.1:64581
[:2012:29::23:00:18] Incoming connection: 127.0.0.1:64582
[:2012:29::23:00:18] Incoming connection: 127.0.0.1:64583
[:2012:29::23:00:21] Incoming connection: 127.0.0.1:64584
[:2012:29::23:00:24] Incoming connection: 127.0.0.1:64585
[:2012:29::23:00:24] Incoming connection: 127.0.0.1:64586
[:2012:29::23:00:26] Incoming connection: 127.0.0.1:64587
[:2012:29::23:00:26] Incoming connection: 127.0.0.1:64588
[:2012:29::23:00:27] Incoming connection: 127.0.0.1:64589
[:2012:29::23:00:27] Incoming connection: 127.0.0.1:64590
[:2012:29::23:00:28] Incoming connection: 127.0.0.1:57721
[:2012:29::23:00:28] Incoming connection: 127.0.0.1:57722
[:2012:29::23:00:30] Incoming connection: 127.0.0.1:57723
[:2012:29::23:00:31] Incoming connection: 127.0.0.1:57724
[:2012:29::23:00:31] Incoming connection: 127.0.0.1:57725
[:2012:29::23:00:32]   Loading filterscript 'randommessages.amx'...
[:2012:29::23:00:32]   Loading filterscript 'spybot.amx'...
[:2012:29::23:00:32]   Loaded 12 filterscripts.

[:2012:29::23:00:32]  
[:2012:29::23:00:32]  ======================================= 
[:2012:29::23:00:32]  |                                     | 
[:2012:29::23:00:32]  |        YSI version 1.04.0000        | 
[:2012:29::23:00:32]  |        By Alex "******" Cole        | 
[:2012:29::23:00:32]  |                                     | 
[:2012:29::23:00:32]  ======================================= 
[:2012:29::23:00:32]  
[:2012:29::23:00:32] Loaded 3 vehicles from: vehicles/trains.txt
[:2012:29::23:00:32] Loaded 3 vehicles from: vehicles/pilots.txt
[:2012:29::23:00:32] Loaded 15 vehicles from: vehicles/lv_law.txt
[:2012:29::23:00:32] Loaded 39 vehicles from: vehicles/lv_airport.txt
[:2012:29::23:00:32] Loaded 255 vehicles from: vehicles/lv_gen.txt
[:2012:29::23:00:32] Loaded 38 vehicles from: vehicles/sf_law.txt
[:2012:29::23:00:32] Loaded 35 vehicles from: vehicles/sf_airport.txt
[:2012:29::23:00:32] Loaded 353 vehicles from: vehicles/sf_gen.txt
[:2012:29::23:00:32] Loaded 24 vehicles from: vehicles/ls_law.txt
[:2012:29::23:00:32] Loaded 37 vehicles from: vehicles/ls_airport.txt
[:2012:29::23:00:32] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[:2012:29::23:00:32] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[:2012:29::23:00:32] Loaded 71 vehicles from: vehicles/whetstone.txt
[:2012:29::23:00:32] Loaded 168 vehicles from: vehicles/bone.txt
[:2012:29::23:00:32] Loaded 61 vehicles from: vehicles/flint.txt
[:2012:29::23:00:32] Loaded 96 vehicles from: vehicles/tierra.txt
[:2012:29::23:00:32] Loaded 96 vehicles from: vehicles/red_county.txt
[:2012:29::23:00:32] Total vehicles from files: 1781
[:2012:29::23:00:32] Reading File: blank
[:2012:29::23:00:32] Reading File: properties/houses.txt
[:2012:29::23:00:33] Reading File: properties/businesses.txt
[:2012:29::23:00:33] Reading File: properties/banks.txt
[:2012:29::23:00:33] Reading File: properties/police.txt
[:2012:29::23:00:33] 
---------------------------------------
[:2012:29::23:00:33] Running Julius95's server

[:2012:29::23:00:33] ---------------------------------------

[:2012:29::23:00:33] Number of vehicle models: 173
[:2012:29::23:00:33] [npc:join] Kurence9 has joined the server (0:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence7 has joined the server (1:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence3 has joined the server (2:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence8 has joined the server (3:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence10 has joined the server (4:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence11 has joined the server (5:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence13 has joined the server (6:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence14 has joined the server (7:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence12 has joined the server (8:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence16 has joined the server (9:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence15 has joined the server (10:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence19 has joined the server (11:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence17 has joined the server (12:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence20 has joined the server (13:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence21 has joined the server (14:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence18 has joined the server (15:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence22 has joined the server (16:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence23 has joined the server (17:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence24 has joined the server (18:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence27 has joined the server (19:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence26 has joined the server (20:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence28 has joined the server (21:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence25 has joined the server (22:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence30 has joined the server (23:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence29 has joined the server (24:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence32 has joined the server (25:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence33 has joined the server (26:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence34 has joined the server (27:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence31 has joined the server (28:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence36 has joined the server (29:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence37 has joined the server (30:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence35 has joined the server (31:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence39 has joined the server (32:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence38 has joined the server (33:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence40 has joined the server (34:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence43 has joined the server (35:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence44 has joined the server (36:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence42 has joined the server (37:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence46 has joined the server (38:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence41 has joined the server (39:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence47 has joined the server (40:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence45 has joined the server (41:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence49 has joined the server (42:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence48 has joined the server (43:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence51 has joined the server (44:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence52 has joined the server (45:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence53 has joined the server (46:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence54 has joined the server (47:127.0.0.1)
[:2012:29::23:00:33] Incoming connection: 127.0.0.1:57726
[:2012:29::23:00:33] [npc:join] Kurence56 has joined the server (48:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence55 has joined the server (49:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence58 has joined the server (50:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence57 has joined the server (51:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence61 has joined the server (52:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence60 has joined the server (53:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence64 has joined the server (54:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence62 has joined the server (55:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence63 has joined the server (56:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence59 has joined the server (57:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence67 has joined the server (58:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence65 has joined the server (59:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence71 has joined the server (60:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence68 has joined the server (61:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence66 has joined the server (62:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence70 has joined the server (63:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence72 has joined the server (64:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence73 has joined the server (65:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence74 has joined the server (66:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence76 has joined the server (67:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence77 has joined the server (68:127.0.0.1)
[:2012:29::23:00:33] [npc:join] Kurence69 has joined the server (69:127.0.0.1)
[:2012:29::23:00:33] Incoming connection: 127.0.0.1:57727
[:2012:29::23:00:34] Incoming connection: 127.0.0.1:57728
[:2012:29::23:00:34] [npc:join] Kurence75 has joined the server (70:127.0.0.1)
[:2012:29::23:00:34] [npc:join] Kurence78 has joined the server (71:127.0.0.1)
[:2012:29::23:00:34] [npc:join] Kurence80 has joined the server (72:127.0.0.1)
[:2012:29::23:00:34] Incoming connection: 127.0.0.1:62931
[:2012:29::23:00:34] Incoming connection: 127.0.0.1:62932
[:2012:29::23:00:34] [npc:join] Kurence79 has joined the server (73:127.0.0.1)
[:2012:29::23:00:34] [npc:join] Kurence81 has joined the server (74:127.0.0.1)
[:2012:29::23:04:28] Incoming connection: 78.72.181.195:51483
[:2012:29::23:04:28] [join] Julius95 has joined the server (75:78.72.181.195)
[:2012:29::23:04:37] [chat] [Julius95]: hi
[:2012:29::23:08:22] [part] Julius95 has left the server (75:1)
Reply
#4

!say is the command for talking irc to in-game. All irc commands start with "!".

Example : !say hello, will display hello to everyone in-game.
Reply
#5

it happens to me too
i try to type !say hello, but it didn't sent over the game or even in the console (because i edit the IRCCMDay and added printf)
Reply
#6

Quote:
Originally Posted by Romel
Посмотреть сообщение
it happens to me too
i try to type !say hello, but it didn't sent over the game or even in the console (because i edit the IRCCMDay and added printf)
Your say command should look like this :

pawn Код:
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]; //creating the local variable for the msg.

            // Echo the formatted message
            format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0x0000FFFF, msg);//you can change colors here
        }
    }
    return 1;
}
Reply
#7

here is mine.

pawn Код:
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(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0x0080FFFF, msg);
            printf(msg);
        }
    }
    return 1;
}
Reply
#8

could someone help?
Reply
#9

? someone
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)