Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- .:==============================================================:.
- Central Gaming TDM.
- Created by Yamoo.
- # If you are reading this, before Yamoo personally has writing
- you are probably leaking the script from somewhere and therefore
- can say you'll be reported if found out.
- # This gamemode has been created for the use of Central Gaming.
- # Credits to Kingunit for creating the y_ini blank gamemode,
- also thanks to Kush for the YSI Server Includes; other credits
- go to the creators of each and every individual who made the
- .inc files.
- # Needs done.
- ; Camera view for Ballas, LSPD and VIP.
- ; Cars need changed - just replace the car ids.
- ; Mapping put into place.
- ; /spec.
- .:--------------------------------------------------------------:. */
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <sscanf2>
- #include <irc>
- #include <foreach>
- //-----[IRC Settings]-----
- #define IRC_SERVER "irc.crystalirc.net"
- #define IRC_PORT (6667)
- #define IRC_CHANNEL "#Warehouse"
- #define BOT_1_NICKNAME "SA-MP Bot[1]"
- #define BOT_1_REALNAME "SA-MP Bot[1]"
- #define BOT_1_USERNAME "SA-MP Bot[1]"
- #define MAX_BOTS (1)
- new gBotID[MAX_BOTS], gGroupID;
- new Text:Classtext;
- new Menu:shop;
- new Menu:bombshop;
- //-----[INI includes]-----
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define PATH "/Users/%s.ini"
- //-----[Color defines]-----
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xA10000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GREY 0xAFAFAFAA
- #define LIME 0x88AA62FF
- #define WHITE 0xFFFFFFAA
- #define RULE 0xFBDF89AA
- #define ORANGE 0xDB881AAA
- #define GOLD 0xB8860BAA
- #define GREY 0xAFAFAFAA
- #define GREEN 0x9FFF00FF
- #define RED 0xA10000AA
- #define YELLOW 0xFFFF00AA
- #define WHITE 0xFFFFFFAA
- #define BLUE 0x0000BBAA
- //-----[0.3c Color defines]-----
- #define COL_EASY "{FFF1AF}"
- #define COL_DGREEN "{0E8C00}"
- #define COL_LOGIN "{98E090}"
- #define COL_WHITE "{FFFFFF}"
- #define COL_BLACK "{0E0101}"
- #define COL_GREY "{C3C3C3}"
- #define COL_GREEN "{6EF83C}"
- #define COL_RED "{F81414}"
- #define COL_YELLOW "{F3FF02}"
- #define COL_ORANGE "{F9B857}"
- #define COL_LIME "{B7FF00}"
- #define COL_CYAN "{00FFEE}"
- #define COL_LBLUE "{298ACF}"
- #define COL_BLUE "{0049FF}"
- #define COL_MAGENTA "{F300FF}"
- #define COL_VIOLET "{B700FF}"
- #define COL_PINK "{FF00EA}"
- #define COL_MARONE "{A90202}"
- #define COL_CMD "{B8FF02}"
- #define COL_PARAM "{3FCD02}"
- #define COL_SERVER "{AFE7FF}"
- #define COL_VALUE "{A3E4FF}"
- #define COL_RULE "{F9E8B7}"
- #define COL_RULE2 "{FBDF89}"
- #define COL_RWHITE "{FFFFFF}"
- #define COL_LGREEN "{9FE4AA}"
- #define COL_LRED "{DA7272}"
- #define COL_LRED2 "{C77D87}"
- #define COL_DYELLOW "{FAFA52}"
- #define COL_BROWN "{8C703F}"
- #define COL_SBLACK "{474747}"
- #define COL_SGREY "{ADADAD}"
- #define COL_DGREY "{616161}"
- #define COL_SBLUE "{3660D1}"
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 32
- /* Team defines */
- #define TEAM_GROVE 1
- #define TEAM_BALLA 2
- #define TEAM_LSPD 3
- #define TEAM_TRIAD 4
- #define TEAM_SURENOS 5
- #define TEAM_VIP 6
- #define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green
- #define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
- #define TEAM_LSPD_COLOR 0x0000BBAA // Blue
- #define TEAM_TRIAD_COLOR 0xA10000AA // Red
- #define TEAM_SURENOS_COLOR 0x0099FF // Light blue
- #define TEAM_VIP_COLOR 0xB8860BAA // Gold
- new gTeam[MAX_PLAYERS];
- new Text3D:Admin[ MAX_PLAYERS ], AdminDuty[ MAX_PLAYERS ],
- checkinv = 0;
- forward ABroadCast(color,const string[],level);
- new
- Float:g_EventPosition[4],
- g_EventWeapon = -1,
- g_EventReward = 0,
- g_EventPlayers = 0,
- pInEvent[MAX_PLAYERS] = 0,
- g_EventOpen = 0;
- //-----[Enum Playerinfo]-----
- enum pInfo
- {
- Password,
- Cash,
- Kills,
- Deaths,
- Adminlevel,
- VIP
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- main() { }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if (classid == 0)
- {
- gTeam[playerid] = TEAM_GROVE;
- }
- else
- {
- gTeam[playerid] = TEAM_BALLA;
- gTeam[playerid] = TEAM_LSPD;
- gTeam[playerid] = TEAM_TRIAD;
- gTeam[playerid] = TEAM_SURENOS;
- gTeam[playerid] = TEAM_VIP;
- }
- }
- SetPlayerToTeamColor(playerid)
- {
- if (gTeam[playerid] == TEAM_GROVE)
- {
- SetPlayerColor(playerid, TEAM_GROVE_COLOR);
- }
- else if (gTeam[playerid] == TEAM_BALLA)
- {
- SetPlayerColor(playerid, TEAM_BALLA_COLOR);
- }
- else if (gTeam[playerid] == TEAM_LSPD_COLOR)
- {
- SetPlayerColor(playerid, TEAM_LSPD_COLOR);
- }
- else if (gTeam[playerid] == TEAM_TRIAD_COLOR)
- {
- SetPlayerColor(playerid, TEAM_TRIAD_COLOR);
- }
- else if (gTeam[playerid] == TEAM_SURENOS_COLOR)
- {
- SetPlayerColor(playerid, TEAM_SURENOS_COLOR);
- }
- else if (gTeam[playerid] == TEAM_VIP_COLOR)
- {
- SetPlayerColor(playerid, TEAM_VIP_COLOR);
- }
- }
- public ABroadCast(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][Adminlevel] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- public OnGameModeInit()
- {
- shop = CreateMenu("Shop Menu", 1, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(shop, 0, "AK47 $1000");
- AddMenuItem(shop, 0, "M4 $1500");
- AddMenuItem(shop, 0, "Tec-9 $1500");
- AddMenuItem(shop, 0, "SMG $500");
- AddMenuItem(shop, 0, "Shotgun $500");
- AddMenuItem(shop, 0, "Deagle $300");
- AddMenuItem(shop, 0, "Armour $1500");
- bombshop = CreateMenu("Bomb Shop Menu", 1, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(bombshop, 0, "RPG $2000");
- AddMenuItem(bombshop, 0, "Gernades $900");
- AddMenuItem(bombshop, 0, "Tear Gas $300");
- AddMenuItem(bombshop, 0, "C4 $900");
- AddMenuItem(bombshop, 0, "Molotovs $900");
- AddMenuItem(bombshop, 0, "Flamethrower $1500");
- gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
- IRC_SetIntData(gBotID[0], E_IRC_CONNECT_DELAY, 20);
- gGroupID = IRC_CreateGroup();
- SetGameModeText("CG:TDM V0.52a");
- DisableInteriorEnterExits();
- // Vehicle spawns.
- AddStaticVehicle(587,2487.4587,-1682.7505,13.0600,88.9653,86,86); // Grove 1
- AddStaticVehicle(587,2504.9736,-1679.4690,13.1859,317.1174,86,86); // Grove 2
- AddStaticVehicle(587,2498.5916,-1651.9669,13.2231,174.3243,86,86); // Grove 3
- AddStaticVehicle(587,2484.4790,-1654.2858,13.1209,91.0507,86,86); // Grove 4
- AddStaticVehicle(587,2187.8391,-1660.4637,14.6782,348.5267,5,5); // Balla 1
- AddStaticVehicle(587,2183.9255,-1681.5304,13.7016,348.5760,5,5); // Balla 2
- AddStaticVehicle(587,2196.8567,-1664.1522,14.5951,350.1524,5,5); // Balla 3
- AddStaticVehicle(587,2192.5518,-1682.3214,13.7180,347.1376,5,5); // Balla 4
- AddStaticVehicle(598,1535.9929,-1673.9319,13.1290,359.3989,0,1); // LSPD 1
- AddStaticVehicle(598,1534.3129,-1685.7982,13.1985,177.9582,0,1); // LSPD 2
- AddStaticVehicle(598,1524.4269,-1682.9047,13.2074,359.6769,0,1); // LSPD 3
- AddStaticVehicle(598,1524.8428,-1663.3488,13.2059,0.8781,0,1); // LSPD 4
- AddStaticVehicle(497,1565.8287,-1647.9678,28.5791,89.5353,0,0); // LSPD Heli spawn.
- AddStaticVehicle(427,1513.7935,-1661.5538,13.6786,266.3866,0,6); // LSPD Enforcer 1
- AddStaticVehicle(427,1514.2697,-1656.1556,13.6712,267.1016,0,6); // LSPD Enforcer 2
- AddStaticVehicle(401,1206.1577,-1730.0765,13.3062,179.7398,3,0); // Triad 1
- AddStaticVehicle(401,1200.3794,-1729.5776,13.3065,180.9349,3,0); // Triad 2
- AddStaticVehicle(401,1192.9402,-1743.7073,13.2958,89.1745,3,0); // Triad 3
- AddStaticVehicle(401,1192.6244,-1750.2810,13.3100,89.9612,3,0); // Triad 4
- AddStaticVehicle(411,1785.4857,-2117.4868,13.1924,270.3767,64,1); // Sur 1
- AddStaticVehicle(411,1793.4227,-2126.0552,13.2740,359.9570,64,1); // Sur 2
- AddStaticVehicle(411,1793.6064,-2107.8752,13.1890,268.7945,64,1); // Sur 3
- AddStaticVehicle(411,1817.2701,-2104.5771,13.1908,335.3533,64,1); // Sur 4
- AddStaticVehicle(522,1140.9578,-2004.5723,68.5618,273.3880,3,8); // // VIP 1
- AddStaticVehicle(522,1141.1970,-2068.0688,68.5465,262.2642,3,8); // // VIP 2
- AddStaticVehicle(411,1247.4617,-2009.5303,59.5283,266.2096,123,1); // // VIP 3
- AddStaticVehicle(411,1245.7002,-2038.8945,59.5622,271.3038,123,1); // // VIP 4
- AddStaticVehicle(411,1276.5537,-2028.3231,58.7090,88.3041,123,1); // // VIP 5
- AddStaticVehicle(411,1277.0875,-2043.1765,58.7599,271.1546,123,1); // // VIP 6
- AddStaticVehicle(411,1265.5612,-2010.4873,58.9884,178.8389,123,1); // // VIP 7
- AddStaticVehicle(411,1245.5374,-2057.9949,59.5526,266.3947,123,1); // // VIP 8
- AddStaticVehicle(411,1245.6647,-2052.2964,59.5647,269.1614,123,1); // // VIP 9
- AddStaticVehicle(425,1117.7528,-2021.2284,74.9871,0.3720,43,0); // VIP Hunter Heli.
- // Grove Street
- AddPlayerClass(105, 2495.495605, -1689.601684, 14.533213, 0.131221, 24, 500, 4, 1, 0, 0); // skin 1
- AddPlayerClass(107, 2495.495605, -1689.601684, 14.533213, 0.131221, 24, 500, 4, 1, 0, 0); // skin 2
- AddPlayerClass(106, 2495.495605, -1689.601684, 14.533213, 0.131221, 24, 500, 4, 1, 0, 0); // skin 3
- // Ballas
- AddPlayerClass(103, 2165.319335, -1672.072509, 16.271999, 270.059112, 24, 500, 4, 1, 0, 0); // skin 1
- AddPlayerClass(102, 2165.319335, -1672.072509, 16.271999, 270.059112, 24, 500, 4, 1, 0, 0); // skin 2
- AddPlayerClass(104, 2165.319335, -1672.072509, 16.271999, 270.059112, 24, 500, 4, 1, 0, 0); // skin 3
- // LSPD.
- AddPlayerClass(280, 1553.188842, -1675.218139, 16.195312, 92.107582, 24, 500, 4, 1, 46, 1); // skin 1
- AddPlayerClass(285, 1553.188842, -1675.218139, 16.195312, 92.107582, 24, 500, 4, 1, 46, 1); // skin 2
- AddPlayerClass(284, 1553.188842, -1675.218139, 16.195312, 92.107582, 24, 500, 4, 1, 46, 1); // skin 3
- //Triad
- AddPlayerClass(117, 1212.407104, -1748.701782, 13.594337, 52.313873, 24, 500, 4, 1, 0, 0); // skin 1
- AddPlayerClass(118, 1212.407104, -1748.701782, 13.594337, 52.313873, 24, 500, 4, 1, 0, 0); // skin 2
- AddPlayerClass(120, 1212.407104, -1748.701782, 13.594337, 52.313873, 24, 500, 4, 1, 0, 0); //skin 3
- // Surenos
- AddPlayerClass(114, 1803.943359, -2124.409423, 13.942373, 3.601522, 24, 500, 4, 1, 0, 0); // skin 1
- AddPlayerClass(115, 1803.943359, -2124.409423, 13.942373, 3.601522, 24, 500, 4, 1, 0, 0); // skin 2
- AddPlayerClass(116, 1803.943359, -2124.409423, 13.942373, 3.601522, 24, 500, 4, 1, 0, 0); // skin 3
- // VIP.
- AddPlayerClass(217, 1123.5151, -2037.0284, 69.8869, 263.9446, 24, 500, 4, 1, 24, 1000); // skin 1
- AddPlayerClass(37, 1123.5151, -2037.0284, 69.8869, 263.9446, 24, 500, 4, 1, 24, 1000); // skin 2
- AddPlayerClass(99, 1123.5151, -2037.0284, 69.8869, 263.9446, 24, 500, 4, 1, 24, 1000); // skin 3
- return 1;
- }
- public OnGameModeExit()
- {
- IRC_Quit(gBotID[0], "SA-MP bot exiting");
- IRC_DestroyGroup(gGroupID);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid,2201.6306,1217.2319,10.8128);
- SetPlayerFacingAngle(playerid,178.6062);
- SetPlayerCameraPos(playerid,2202.2537,1210.6444,10.8128);
- SetPlayerCameraLookAt(playerid,2201.6306,1217.2319,10.8128);
- SetPlayerTeamFromClass(playerid, classid);
- switch(classid)
- {
- case 0 .. 2:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "Grove Street.");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_GROVE_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- SetPlayerPos(playerid,2481.010253, -1654.001953, 13.317111);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,2482.577880, -1661.032836, 14.404399);
- SetPlayerCameraLookAt(playerid,2201.6306,1217.2319,10.8128);
- SetPlayerTeam(playerid, TEAM_GROVE);
- gTeam[playerid] = TEAM_GROVE;
- SetPlayerColor(playerid, TEAM_GROVE_COLOR);
- }
- case 3 .. 5:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "Ballas");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_BALLA_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- SetPlayerPos(playerid,2167.300292,-1672.419311,15.080292);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,2165.319335, -1672.072509, 16.271999);
- SetPlayerTeam(playerid, TEAM_BALLA);
- gTeam[playerid] = TEAM_BALLA;
- SetPlayerColor(playerid, TEAM_BALLA_COLOR);
- }
- case 6 .. 8:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "LSPD");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_LSPD_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- SetPlayerPos(playerid,2495.495605,-1689.601684,14.533213);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,1555.510620, -1675.810668, 17.036300);
- SetPlayerTeam(playerid, TEAM_LSPD);
- gTeam[playerid] = TEAM_LSPD;
- SetPlayerColor(playerid, TEAM_LSPD_COLOR);
- }
- case 9 .. 11:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "Japanese Triad");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_TRIAD_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- SetPlayerPos(playerid,1212.407104,-1748.701782,13.594337);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,1211.534667, -1750.346191, 14.528200);
- SetPlayerTeam(playerid, TEAM_TRIAD);
- gTeam[playerid] = TEAM_TRIAD;
- SetPlayerColor(playerid, TEAM_TRIAD_COLOR);
- }
- case 12 .. 14:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "Southside Surenos");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_SURENOS_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- SetPlayerPos(playerid,1803.943359,-2124.409423,13.942373);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,1804.112792,-2125.102539,14.747099);
- SetPlayerTeam(playerid, TEAM_SURENOS);
- gTeam[playerid] = TEAM_SURENOS;
- SetPlayerColor(playerid, TEAM_SURENOS_COLOR);
- }
- case 15 .. 17:
- {
- TextDrawDestroy(Classtext);
- Classtext = TextDrawCreate(170.0, 350.0, "V.I.P");
- TextDrawLetterSize(Classtext, 1.5, 2.5);
- TextDrawFont(Classtext, 0);
- TextDrawColor(Classtext, TEAM_VIP_COLOR);
- TextDrawShowForPlayer(playerid,Classtext);
- if(PlayerInfo[playerid][VIP] < 1)
- {
- ForceClassSelection(playerid);
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, RED, "Your do not have the VIP status to select this class!"); }
- SetPlayerPos(playerid,1123.5151,-2037.0284,69.8869);
- SetPlayerFacingAngle(playerid,176.249954);
- SetPlayerCameraPos(playerid,2165.319335, -1672.072509, 16.271999);
- SetPlayerTeam(playerid, TEAM_VIP);
- gTeam[playerid] = TEAM_VIP;
- SetPlayerColor(playerid, TEAM_VIP_COLOR);
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "[JOINED] %s has joined the server", pname);
- SendClientMessageToAll(COLOR_GREY, string);
- for(new chat = 0; chat <= 100; chat++)
- {
- SendClientMessage(playerid,COLOR_WHITE," ");
- }
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"==========================================================================================================");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN" Central Gaming TDM.");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN" ");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"» Welcome to Central Gaming TDM.");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"» Please visit our forums at www.centralgaming.elementfx.com");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"» Next update; 30th November 2011");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"» If you'll like to donate to earn yourself extra items then visit our fourm.");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"» We'll also be releasing other servers based on the vote of the ");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN" .. community later on in time.");
- SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"==========================================================================================================");
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""#COL_ORANGE":: "#COL_WHITE"Login", "\t\t"#COL_EASY"Central Gaming "#COL_DGREEN"TDM "#COL_EASY"(V1.02a)\n\n"#COL_WHITE"Welcome back, \nPlease enter your password below to start the game!", "Login", "Exit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""#COL_ORANGE":: "#COL_WHITE"Register" , "\t\t"#COL_EASY"Central Gaming "#COL_DGREEN"TDM "#COL_EASY"(V1.02a)\n\n"#COL_WHITE"You are not registered, \nPlease enter a password below to register your account!", "Register", "Exit");
- }
- 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 pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), "[LEFT] %s has left the server. (Timeout)", pname);
- case 1: format(string, sizeof(string), "[LEFT] %s has left the server. (Leaving)", pname);
- case 2: format(string, sizeof(string), "[LEFT] %s has left the server. (Kicked/Banned)", pname);
- }
- SendClientMessageToAll(COLOR_GREY, string);
- 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);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
- INI_WriteInt(File,"Adminlevel",PlayerInfo[playerid][Adminlevel]);
- INI_WriteInt(File,"VIP",PlayerInfo[playerid][VIP]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, GREY, "You have chosen your class!");
- SendClientMessage(playerid, GREY, "VIP status is available through donations!");
- SendClientMessage(playerid, GREY, "Have fun and stay clean ;)!");
- SetPlayerToTeamColor(playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- GivePlayerMoney(killerid,450);
- GivePlayerMoney(playerid,-150);
- 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 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);
- PlayerInfo[killerid][Kills]++;
- PlayerInfo[playerid][Deaths]++;
- if(pInEvent[playerid] == 1) {
- g_EventPlayers--;
- pInEvent[playerid] = 0;
- if(g_EventPlayers == 1) {
- foreach(Player, i) {
- if(pInEvent[i] == 1) {
- new string[128], player_Name[MAX_PLAYER_NAME];
- format(string, sizeof(string), ""#COL_BROWN"[EVENT]"#COL_EASY" %s has won the LMS event and has collected $%d!", player_Name, g_EventReward);
- SendClientMessageToAll(-1, string);
- GivePlayerMoney(i, g_EventReward);
- pInEvent[i] = 0;
- g_EventOpen = 0, g_EventPlayers = 0, g_EventReward = 0, g_EventWeapon = 0;
- SpawnPlayer(i);
- }
- }
- }
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- new Menu:current;
- current = GetPlayerMenu(playerid);
- if(current == shop)
- {
- switch(row)
- {
- case 0:{
- if(PlayerInfo[playerid][Cash] <= 999)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $1000!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 1000)
- GivePlayerWeapon(playerid, 30, 600);
- GivePlayerMoney(playerid, -1000);
- }
- case 1:{
- if(PlayerInfo[playerid][Cash] <= 1499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $1500!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 1500)
- GivePlayerWeapon(playerid, 31, 600);
- GivePlayerMoney(playerid, -1500);
- }
- case 2:{
- if(PlayerInfo[playerid][Cash] <= 1499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $1500!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 1500)
- GivePlayerWeapon(playerid, 32, 50);
- GivePlayerMoney(playerid, -1500);
- }
- case 3:{
- if(PlayerInfo[playerid][Cash] <= 499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $500!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >=500)
- GivePlayerWeapon(playerid, 29, 300);
- GivePlayerMoney(playerid, -500);
- }
- case 4:{
- if(PlayerInfo[playerid][Cash] <= 499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $500!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >=500)
- GivePlayerWeapon(playerid, 25, 50);
- GivePlayerMoney(playerid, -500);
- }
- case 5:{
- if(PlayerInfo[playerid][Cash] <= 299)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $300!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >=300)
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerMoney(playerid, -300);
- }
- case 6:{
- if(PlayerInfo[playerid][Cash] <= 1499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $1,500!");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 1500)
- SetPlayerArmour(playerid, 100);
- GivePlayerMoney(playerid, -1500);
- return 1;
- }
- }
- }
- if(current == bombshop)
- {
- switch(row)
- {
- case 0:{
- if(PlayerInfo[playerid][Cash] <= 1999)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $2000");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 2000)
- GivePlayerWeapon(playerid, 35, 5);
- GivePlayerMoney(playerid, -2000);
- }
- case 1:{
- if(PlayerInfo[playerid][Cash] <= 899)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $900");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 900)
- GivePlayerWeapon(playerid, 16, 3);
- GivePlayerMoney(playerid, -900);
- }
- case 2:{
- if(PlayerInfo[playerid][Cash] <= 299)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $300");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 300)
- GivePlayerWeapon(playerid, 17, 3);
- GivePlayerMoney(playerid, -300);
- }
- case 3:{
- if(PlayerInfo[playerid][Cash] <= 899)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $900");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 900)
- GivePlayerWeapon(playerid, 39, 5);
- GivePlayerWeapon(playerid, 40, 5);
- GivePlayerMoney(playerid, -900);
- }
- case 4:{
- if(PlayerInfo[playerid][Cash] <= 899)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $900");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 900)
- GivePlayerWeapon(playerid, 18, 5);
- GivePlayerMoney(playerid, -900);
- }
- case 5:{
- if(PlayerInfo[playerid][Cash] <= 1499)
- {
- SendClientMessage(playerid, GREY, "Shop: You need $1500");
- return 1;
- }
- else if(PlayerInfo[playerid][Cash] >= 1500)
- GivePlayerWeapon(playerid, 37, 500);
- GivePlayerMoney(playerid, -1500);
- }
- }
- }
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""#COL_ORANGE":: "#COL_WHITE"Register" , "\t\t"#COL_EASY"Central Gaming "#COL_DGREEN"TDM "#COL_EASY"(V1.02a)\n\n"#COL_RED"You have entered a invalid password\n"#COL_WHITE"You are not registered, \nPlease enter a password below to register your account!", "Register", "Exit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Adminlevel",0);
- INI_WriteInt(File,"VIP",0);
- INI_Close(File);
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][Password])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][Cash]);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""#COL_ORANGE":: "#COL_WHITE"Login", "\t\t"#COL_EASY"Central Gaming "#COL_DGREEN"TDM "#COL_EASY"(V1.02a)\n\n"#COL_RED"You have entered a invalid password\n"#COL_WHITE"Welcome back, \nPlease enter your password below to start the game!", "Login", "Exit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- //-----[LoadUser Data]-----
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][Password]);
- INI_Int("Cash",PlayerInfo[playerid][Cash]);
- INI_Int("Kills",PlayerInfo[playerid][Kills]);
- INI_Int("Deaths",PlayerInfo[playerid][Deaths]);
- INI_Int("Adminlevel",PlayerInfo[playerid][Adminlevel]);
- INI_Int("VIP",PlayerInfo[playerid][VIP]);
- return 1;
- }
- //-----[Userpatch]-----
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- //-----[Hash function. Thanxx to Dracoblue]-----
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- //-----[INV Explosion]-----
- forward Explosion(targetid, adminid);
- public Explosion(targetid, adminid) {
- if(checkinv == 1)
- {
- new Float:health;
- GetPlayerHealth(targetid,health);
- if(health == 100)
- {
- SendClientMessage(targetid,COLOR_RED,"Invulnerability check result : [POSITIVE]");
- checkinv = 0;
- }
- else if(health != 100)
- {
- SendClientMessage(targetid,COLOR_YELLOW,"Invulnerability check result : [NEGATIVE]");
- checkinv = 0;
- }
- }
- return 1;
- }
- //-----[Callbacks]-----
- public IRC_OnConnect(botid, ip[], port)
- {
- printf("*** IRC_OnConnect: Bot ID %d connected to %s:%d", botid, ip, port);
- IRC_JoinChannel(botid, IRC_CHANNEL);
- IRC_AddToGroup(gGroupID, botid);
- return 1;
- }
- public IRC_OnDisconnect(botid, ip[], port, reason[])
- {
- printf("*** IRC_OnDisconnect: Bot ID %d disconnected from %s:%d (%s)", botid, ip, port, reason);
- IRC_RemoveFromGroup(gGroupID, botid);
- return 1;
- }
- public IRC_OnConnectAttempt(botid, ip[], port)
- {
- printf("*** IRC_OnConnectAttempt: Bot ID %d attempting to connect to %s:%d...", botid, ip, port);
- return 1;
- }
- 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;
- }
- 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;
- }
- //-----[Unfreeze LMS]-----
- //-----[Unfreezeplayer]-----
- forward UnfreezeLMS(playerid);
- public UnfreezeLMS(playerid)
- {
- foreach(Player, i)
- {
- if(pInEvent[i] == 1)
- {
- if(g_EventOpen == 1)
- {
- TogglePlayerControllable(i, 1);
- GameTextForPlayer(i, "~r~Be the Last Man Standing!", 2000, 3);
- }
- }
- }
- return 1;
- }
- // .:-----------------------------------------------------------------------:.
- // .:=======================================================================:.
- // { This is the start of ZCMD commands. }
- // { Date: 24/08/11 using ZCMD and SSCANF }
- // { Last Updated: 25/08/11 By: Kingunit }
- //
- // .:-----------------------------------------------------------------------:.
- // .:=======================================================================:.
- //-----[Commands]-----
- CMD:hack(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- if(checkinv == 1)
- {
- new Float:health;
- new targetid = GetPlayerHealth(targetid, health);
- if(health == 100)
- {
- SendClientMessage(playerid,COLOR_RED,"Hack result = Positive; This player is hacking.");
- checkinv = 1;
- }
- else if(health != 100)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Hack result = Negative; This player is not hacking.");
- checkinv = 0;
- }
- }
- return 1;
- }
- CMD:savepos(playerid, params[])
- {
- new Float:X, Float:Z, Float:Y, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- new File:pos=fopen("OnFootPos.txt", io_append);
- new string[128];
- format(string, sizeof(string), "(%f, %f, %f, %f);\r\n", X, Y, Z, A);
- SendClientMessage(playerid,COLOR_GREY,"OnFootPosition saved to OnFootPos.txt !");
- fwrite(pos, string);
- fclose(pos);
- return 1;
- }
- CMD:savecampos(playerid, params[])
- {
- new Float:X, Float:Z, Float:Y;
- GetPlayerCameraPos(playerid, X, Y, Z);
- new File:pos=fopen("CameraPos.txt", io_append);
- new string[128];
- format(string, sizeof(string), "(%f, %f, %f);\r\n", X, Y, Z);
- SendClientMessage(playerid,COLOR_GREY,"CameraPos saved to CameraPos.txt !");
- fwrite(pos, string);
- fclose(pos);
- return 1;
- }
- CMD:commands(playerid, params[])
- {
- SendClientMessage(playerid,COLOR_WHITE, ".:: Commands ::.");
- SendClientMessage(playerid,COLOR_WHITE, "/pm - /rules - /kill");
- return 1;
- }
- //-----[Rules]-----
- CMD:rules(playerid, params[])
- {
- SendClientMessage(playerid,COLOR_WHITE, ".:: Server Rules::.");
- SendClientMessage(playerid,COLOR_WHITE, "Do not use hack programs.");
- SendClientMessage(playerid,COLOR_WHITE, "Do not ask for a Administrator rank.");
- SendClientMessage(playerid,COLOR_WHITE, "Do not drive by whilst driving.");
- return 1;
- }
- //-----[Kill]-----
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, COLOR_RED, ""#COL_LGREEN"[INFO]"#COL_SBLUE" You committed a suicide!");
- return 1;
- }
- //-----[PM]-----
- COMMAND:pm(playerid, params[])
- {
- new str[128],id,pname[MAX_PLAYER_NAME], Message[128];
- if(sscanf(params, "us[128]", id, Message))SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Message]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- GetPlayerName(id, str, 24);
- format(str, sizeof(str), "PM To %s(%d): %s", str, id, Message);
- GetPlayerName(id, str, 24);
- format(str, sizeof(str), "PM To %s(%d): %s", str, id, Message);
- SendClientMessage(playerid, COLOR_RED, str);
- GetPlayerName(playerid, pname, sizeof(pname));
- format(str, sizeof(str), "PM From %s(%d): %s", pname, playerid, Message);
- SendClientMessage(id, COLOR_RED, str);
- }
- return 1;
- }
- //-----[Adminhelp]-----
- CMD:ah(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- SendClientMessage(playerid,COLOR_WHITE, ""#COL_DGREEN"===============[ "#COL_WHITE"Administrator Commands"#COL_DGREEN" ]===============");
- SendClientMessage(playerid,COLOR_WHITE, ""#COL_ORANGE"> "#COL_DGREEN"General note:"#COL_WHITE" This are the Administrator commands.");
- SendClientMessage(playerid,COLOR_WHITE, ""#COL_ORANGE"> "#COL_DGREEN"Administrator (1):"#COL_WHITE" /kick - /ban - /slap - /explode - /apm - /inv - /gmx - /freeze - /freezeall");
- SendClientMessage(playerid,COLOR_WHITE, ""#COL_ORANGE"> "#COL_DGREEN"Administrator (1):"#COL_WHITE" /adminduty - /jetpack - /goto - /gethere - /respawn");
- return 1;
- }
- //-----[AdminChat]----
- CMD:ac(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED," You are not authorized to use this command!");
- if(!isnull(params))
- {
- new string[128],id;
- GetPlayerName(id, string, 24);
- format(string, sizeof(string), "Administrator %s(%d): %s", string, id, params);
- ABroadCast(COLOR_YELLOW, string, 1);
- }
- return 1;
- }
- CMD:report(playerid, params[])
- {
- new targetid;
- if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "/report <playerid> <reason>");
- if(!isnull(params))
- {
- new string[128];
- new pName[24];
- new pTame[24];
- GetPlayerName(playerid, pName, 24);
- GetPlayerName(targetid, pTame, 24);
- format(string, sizeof(string), "%s has reported %s for %s", pName,pTame,params);
- ABroadCast(COLOR_YELLOW, string, 1);
- }
- return 1;
- }
- CMD:t(playerid, params[])
- {
- foreach(Player, i)
- {
- if(gTeam[i] == gTeam[playerid])
- {
- new string[128], pName[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof(string),"TEAM CHAT: %s says: %s",pName,params);
- SendClientMessage(i, YELLOW, string);
- }
- }
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid;
- if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- new Float:SLX, Float:SLY, Float:SLZ;
- GetPlayerPos(targetid, SLX, SLY, SLZ);
- SetPlayerPos(targetid, SLX, SLY, SLZ+5);
- PlayerPlaySound(targetid, 1130, SLX, SLY, SLZ+5);
- new string[128];
- new pName[24];
- new pTame[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTame,24);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been slapped by Administrator %s.",pTame,pName);
- SendClientMessageToAll(COLOR_RED, string);
- }
- return 1;
- }
- //-----[Adminhelp]-----
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, reason[64], string[128];
- if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Reason]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- {
- new pTargetName[24], pName[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTargetName,24);
- format(string, sizeof(string), ""#COL_ORANGE"[SERVER]"#COL_LRED" Admin %s has kicked %s: %s", pName, pTargetName, reason);
- SendClientMessageToAll(COLOR_RED,string);
- Kick(targetid);
- }
- return 1;
- }
- //-----[Server GMX]-----
- CMD:gmx(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- {
- new string[256];
- new pName[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" Administrator %s has created a server restart.",pName);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
- INI_WriteInt(File,"Adminlevel",PlayerInfo[playerid][Adminlevel]);
- INI_Close(File);
- SendClientMessageToAll(COLOR_RED, string);
- GameTextForAll("Server Restarting",3000,0);
- SetTimer("Gmx",3000,false);
- SendRconCommand("gmx");
- }
- return 1;
- }
- //-----[Ban]-----
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, reason[64], string[128];
- if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Reason]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- {
- new pTargetName[24], pName[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTargetName,24);
- format(string, sizeof(string), ""#COL_ORANGE"[SERVER]"#COL_LRED" Admin %s has IP banned %s: %s", pName, pTargetName, reason);
- SendClientMessageToAll(COLOR_RED,string);
- Ban(targetid);
- }
- return 1;
- }
- //-----[Shop]-----
- CMD:shop(playerid, params[])
- {
- ShowMenuForPlayer(shop, playerid);
- return 1;
- }
- CMD:bombshop(playerid, params[])
- {
- if(PlayerInfo[playerid][VIP] < 1) return SendClientMessage(playerid, COLOR_RED, "You need to be a VIP member to use this command!");
- {
- ShowMenuForPlayer(bombshop, playerid);
- return 1;
- }
- }
- //----[Explode]-----
- CMD:explode(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid;
- if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- new Float:SLX, Float:SLY, Float:SLZ;
- GetPlayerPos(targetid, SLX, SLY,SLZ);
- CreateExplosion(SLX, SLY, SLZ, 11, 0.25);
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTame,24);
- GivePlayerMoney(playerid, 150);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been exploded by an Administrator and you will be refunded.",pTame);
- SendClientMessageToAll(COLOR_RED, string);
- }
- return 1;
- }
- //-----[Admin PM]-----
- COMMAND:apm(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new str[128],id,pname[MAX_PLAYER_NAME], Message[128];
- if(sscanf(params, "us[128]", id, Message))SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Message]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- GetPlayerName(id, str, 24);
- format(str, sizeof(str), "[ADMIN] %s(%d): %s", str, id, Message);
- GetPlayerName(id, str, 24);
- format(str, sizeof(str), "[ADMIN] %s(%d): %s", str, id, Message);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- GetPlayerName(playerid, pname, sizeof(pname));
- format(str, sizeof(str), "[ADMIN] %s(%d): %s", pname, playerid, Message);
- SendClientMessage(id, COLOR_YELLOW, str);
- }
- return 1;
- }
- //-----[Make admin]-----
- COMMAND:makeadmin(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new id, lvl;
- if(sscanf(params, "ui", id, lvl)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Level]");
- else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid ID");
- else if(lvl > 1) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ADMIN]"#COL_LRED" Administrator level cannot be higher then 1!");
- else
- {
- PlayerInfo[id][Adminlevel] = lvl;
- }
- return 1;
- }
- //-----[Freeze]-----
- CMD:freeze(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- new pTargetName[24], pName[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTargetName,24);
- format(string, sizeof(string), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been frozen by Administrator %s.",pTargetName, pName);
- SendClientMessageToAll(COLOR_RED,string);
- TogglePlayerControllable(targetid, 0);
- return 1;
- }
- //-----[Unfreeze]-----
- CMD:unfreeze(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- new pTargetName[24], pName[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTargetName,24);
- format(string, sizeof(string), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been unfrozen by Administrator %s.",pTargetName, pName);
- SendClientMessageToAll(COLOR_RED,string);
- TogglePlayerControllable(targetid, 1);
- return 1;
- }
- //-----[Adminduty]-----
- CMD:adminduty(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- if( AdminDuty[ playerid ] == 0 )
- {
- AdminDuty[ playerid ] = 1;
- Admin[ playerid ] = Create3DTextLabel("ADMIN DUTY",0x5CD6CAFF,30.0,40.0,50.0,10.0,0);
- Attach3DTextLabelToPlayer( Admin[ playerid ], playerid, 0.0, 0.0, 0.3);
- SetPlayerHealth(playerid, 100000);
- SetPlayerArmour(playerid, 100000);
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof string,""#COL_LRED" Administrator %s is on Admin Duty.",pName,pTame);
- ABroadCast(COLOR_WHITE, string, 1);
- }
- else
- {
- AdminDuty[ playerid ] = 0;
- Delete3DTextLabel( Admin[ playerid ] );
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof string,""#COL_LRED" Administrator %s is off Admin Duty.",pName,pTame);
- ABroadCast(COLOR_WHITE, string, 1);
- }
- return 1;
- }
- //-----[Freeze All]-----
- CMD:freezeall(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" Administrator %s has frozen everyone.",pName,pTame);
- SendClientMessageToAll(COLOR_RED, string);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TogglePlayerControllable(i,0);
- }
- }
- return 1;
- }
- //-----[Unfreeze All]-----
- CMD:unfreezeall(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" Administrator %s has unfrozen everyone.",pName,pTame);
- SendClientMessageToAll(COLOR_RED, string);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TogglePlayerControllable(i,1);
- }
- }
- return 1;
- }
- //-----[Goto]-----
- CMD:goto(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, string[128];
- if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- new pName[24];
- GetPlayerName(targetid,pName,128);
- format(string, sizeof(string), ""#COL_ORANGE"[ADMIN]"#COL_LRED" You succesfully teleported to [%d] %s.",targetid, pName);
- SendClientMessage(playerid,COLOR_RED,string);
- SetPlayerInterior(playerid,GetPlayerInterior(targetid));
- new Float:TPX, Float:TPY, Float:TPZ;
- GetPlayerPos(targetid, TPX, TPY, TPZ);
- SetPlayerPos(playerid, TPX, TPY, TPZ+1);
- }
- return 1;
- }
- //-----[Respawn]-----
- CMD:respawn(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- new string[128];
- new pName[24], pTame[24];
- GetPlayerName(playerid,pName,24);
- GetPlayerName(targetid,pTame,24);
- format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been respawned by Administrator %s.",pTame,pName);
- SendClientMessageToAll(COLOR_RED, string);
- SpawnPlayer(targetid);
- }
- return 1;
- }
- //-----[Gethere]-----
- CMD:gethere(playerid, params[])
- {
- if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- new targetid, string[128];
- if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
- else
- {
- new pName[24];
- GetPlayerName(playerid,pName,128);
- format(string, sizeof(string), ""#COL_ORANGE"[ADMIN]"#COL_LRED" You have been teleported to Administrator %s.",pName);
- SendClientMessage(targetid,COLOR_RED,string);
- SetPlayerInterior(targetid,GetPlayerInterior(playerid));
- new Float:TPX, Float:TPY, Float:TPZ;
- GetPlayerPos(playerid, TPX, TPY, TPZ);
- SetPlayerPos(targetid, TPX, TPY, TPZ+1);
- }
- return 1;
- }
- CMD:jetpack(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][Adminlevel] < 1)
- {
- SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- return 1;
- }
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerSpecialAction(playerid, 2);
- SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ADMIN]"#COL_LRED" Jetpack spawned. Dont forget to remove it with /removejet.");
- }
- }
- return 1;
- }
- //-----[Remove Jetpack]-----
- CMD:removejet(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][Adminlevel] < 1)
- {
- SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
- return 1;
- }
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerSpecialAction(playerid, 0);
- SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ADMIN]"#COL_LRED" Your jetpack has been removed.");
- }
- }
- return 1;
- }
- //-----[Create LMS]-----
- CMD:createlms(playerid, params[]) {
- new
- WeaponID,
- RewardAmount,
- string[128],
- player_Name[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Adminlevel] > 2) {
- if(sscanf(params, "ii", WeaponID, RewardAmount))
- return SendClientMessage(playerid, -1, ""#COL_DGREY"[CMD] / "#COL_SGREY"[WeaponID] [Reward]");
- GetPlayerPos(playerid, g_EventPosition[0], g_EventPosition[1], g_EventPosition[2]);
- GetPlayerFacingAngle(playerid, g_EventPosition[3]);
- g_EventWeapon = WeaponID;
- g_EventReward = RewardAmount;
- format(string, sizeof(string), ""COL_BROWN"[EVENT]"#COL_EASY" Administrator %s has created an LMS event! "#COL_BROWN"/join "#COL_EASY"to join the event!", player_Name);
- SendClientMessageToAll(-1, string);
- SetTimerEx("UnfreezeLMS", 20000, false, "i", playerid);
- g_EventOpen = 1;
- g_EventPlayers = 0;
- }
- else return SendClientMessage(playerid, COLOR_RED, ".:: You are not authorized to use this command ::.");
- return true;
- }
- //-----[Join LMS]-----
- CMD:join(playerid, params[]) {
- #pragma unused params
- if(pInEvent[playerid] == 0) {
- if(g_EventOpen == 1) {
- SetPlayerPos(playerid, g_EventPosition[0], g_EventPosition[1], g_EventPosition[2]);
- SetPlayerFacingAngle(playerid, g_EventPosition[3]);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, g_EventWeapon, 100000);
- GameTextForPlayer(playerid, "~g~Joined event~n~~w~Please wait..", 3000, 3);
- TogglePlayerControllable(playerid, 0);
- g_EventPlayers++;
- pInEvent[playerid] = 1; //Now in the event!
- }
- else return SendClientMessage(playerid, COLOR_RED, ".:: No event is going on ::.");
- }
- else return SendClientMessage(playerid, COLOR_RED, ".:: You're already in the event ::.");
- return true;
- }
- // .:-----------------------------------------------------------------------:.
- // .:=======================================================================:.
- // { This is the start of IRC commands. }
- // { Date: 09/09/11 using IRC plugin }
- // { Last Updated: 10/09/11 By: Kingunit }
- //
- // .:-----------------------------------------------------------------------:.
- // .:=======================================================================:.
- //-----[IRC Kick]-----
- IRCCMD:kick(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid, reason[64];
- if (sscanf(params, "dS(No reason)[64]", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- 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(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been kicked by IRC Admin %s: %s", name, user, reason);
- SendClientMessageToAll(0x0000FFFF, msg);
- Kick(playerid);
- }
- }
- return 1;
- }
- //-----[IRC Ban]-----
- IRCCMD:ban(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid, reason[64];
- if (sscanf(params, "dS(No reason)[64]", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- 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(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been banned by IRC Admin %s: %s", name, user, reason);
- SendClientMessageToAll(0x0000FFFF, msg);
- BanEx(playerid, reason);
- }
- }
- return 1;
- }
- //-----[IRC RCON]-----
- IRCCMD:rcon(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- if (!isnull(params))
- {
- if (strcmp(params, "exit", true) != 0 && strfind(params, "loadfs irc", true) == -1)
- {
- new msg[128];
- format(msg, sizeof(msg), "RCON command %s has been executed.", params);
- IRC_GroupSay(gGroupID, channel, msg);
- SendRconCommand(params);
- }
- }
- }
- return 1;
- }
- //-----[IRC Slap]-----
- IRCCMD:slap(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new Float:SLX, Float:SLY, Float:SLZ;
- GetPlayerPos(playerid, SLX, SLY,SLZ);
- SetPlayerPos(playerid, SLX, SLY, SLZ+5);
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** %s has been slapped by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been slapped by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- }
- }
- return 1;
- }
- //-----[IRC Explode]-----
- IRCCMD:explode(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new Float:SLX, Float:SLY, Float:SLZ;
- GetPlayerPos(playerid, SLX, SLY,SLZ);
- CreateExplosion(SLX, SLY, SLZ, 11, 0.25);
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** %s has been exploded by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been exploded by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- }
- }
- return 1;
- }
- //-----[IRC Armup]-----
- IRCCMD:armup(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100.0);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 27, 500);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 1, 1);
- format(msg, sizeof(msg), "02*** %s has been armed by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been armed by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- }
- }
- return 1;
- }
- //-----[IRC Respawn]-----
- IRCCMD:respawn(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** %s has been respawned by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been respawned by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- SpawnPlayer(playerid);
- }
- }
- return 1;
- }
- //-----[IRC Freeze]-----
- IRCCMD:freeze(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** %s has been frozen by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been frozen by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- TogglePlayerControllable(playerid, 0);
- }
- }
- return 1;
- }
- //-----[IRC Unfreeze]-----
- IRCCMD:unfreeze(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** %s has been unfrozen by IRC Admin %s", name, user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" %s has been unfrozen by IRC Admin %s", name, user);
- SendClientMessageToAll(0x0000FFFF, msg);
- TogglePlayerControllable(playerid, 1);
- }
- }
- return 1;
- }
- //-----[IRC Freezeall]-----
- IRCCMD:freezeall(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid;
- if (IsPlayerConnected(playerid))
- {
- new msg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "02*** All players are frozen by IRC Admin %s", user);
- IRC_GroupSay(gGroupID, channel, msg);
- format(msg, sizeof(msg), ""#COL_ORANGE"[SERVER]"#COL_LRED" All players are frozen by IRC Admin %s", user);
- SendClientMessageToAll(0x0000FFFF, msg);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TogglePlayerControllable(i,0);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment