Posted by Conor_M on Fri 4th Jul 07:48 (modification of post by QzZblLzVmWkCOWhX view diff)
diff | download | new post
- #include <a_samp> // SAMP main functs include
- #include <core> // PAWN main functs (if, else lol.)
- #include <file> // File Actions (req.)
- #include <float> // mathmatics
- #include <dprop> // DProp
- #include <dutils> // DUtils
- #include <dudb> // DUDB
- #include <a_irc> // IRC Include
- #include <cpstream> //Makatra's Checkpoint streamer
- #include <vstream> //TaXi's Vehicle Streamer
- #pragma dynamic 8192 // 8192 :D
- #pragma tabsize 0 // Tab indent
- // COLOURS
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_HELP 0xFFBA79FF
- #define COLOR_HELP2 0x9E1000FF
- new gTeam[MAX_PLAYERS];
- // TEAMS
- #define TEAM_COP 1
- #define TEAM_CIVIL 2
- // OTHER
- #define sversion "0.1" // just like BMUK's :p
- //NEW
- new bankentercp;
- new bankleavecp;
- new bankrobcp;
- new stupidsystem =0;
- // IRC Shit
- new EchoConnection; // This will hold the connection ID for messages.
- new EchoChan[25] = "#saroleplay.echo"; // This is the channel you want your echo to be in, as well as the !say command.
- new Connections = 0;
- new bool:TimerSet = false;
- //Forwards
- forward EventTimer();
- new aWeaponNames[][32] = {
- {"Unarmed (Fist)"}, // 0
- {"Brass Knuckles"}, // 1
- {"Golf Club"}, // 2
- {"Night Stick"}, // 3
- {"Knife"}, // 4
- {"Baseball Bat"}, // 5
- {"Shovel"}, // 6
- {"Pool Cue"}, // 7
- {"Katana"}, // 8
- {"Chainsaw"}, // 9
- {"Purple Dildo"}, // 10
- {"Big White Vibrator"}, // 11
- {"Medium White Vibrator"}, // 12
- {"Small White Vibrator"}, // 13
- {"Flowers"}, // 14
- {"Cane"}, // 15
- {"Grenade"}, // 16
- {"Teargas"}, // 17
- {"Molotov"}, // 18
- {" "}, // 19
- {" "}, // 20
- {" "}, // 21
- {"Colt 45"}, // 22
- {"Colt 45 (Silenced)"}, // 23
- {"Desert Eagle"}, // 24
- {"Normal Shotgun"}, // 25
- {"Sawnoff Shotgun"}, // 26
- {"Combat Shotgun"}, // 27
- {"Micro Uzi"}, // 28
- {"MP5"}, // 29
- {"AK47"}, // 30
- {"M4"}, // 31
- {"Tec9"}, // 32
- {"Country Rifle"}, // 33
- {"Sniper Rifle"}, // 34
- {"Rocket Launcher"}, // 35
- {"Heat-Seeking Rocket Launcher"}, // 36
- {"Flamethrower"}, // 37
- {"Minigun"}, // 38
- {"Satchel Charge"}, // 39
- {"Detonator"}, // 40
- {"Spray Can"}, // 41
- {"Fire Extinguisher"}, // 42
- {"Camera"}, // 43
- {"Night Vision Goggles"}, // 44
- {"Infrared Vision Goggles"}, // 45
- {"Parachute"}, // 46
- {"Fake Pistol"} // 47
- };
- new aDisconnectNames[][16] = {
- {"Timeout"}, // 0
- {"Left"}, // 1
- {"Kicked"} // 2
- };
- // END IRC Shit
- new PLAYERLIST_authed[MAX_PLAYERS];
- // MAIN
- main()
- {
- print("\n####################");
- print("# Cops'N'Robbers #");
- print("# for NeoMrsir #");
- print("# developed by Rob #");
- print("# & Conor #");
- print("####################\n");
- }
- // The main part of the whole thing.
- SetPlayerTeamFromClass(playerid, classid)
- {
- if (classid == 0)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else
- {
- gTeam[playerid] = TEAM_CIVIL;
- }
- }
- public OnGameModeInit()
- {
- EchoConnection = ircConnect("extreme.nl.eu.gtanet.com", 6667, "RobTest");
- SetGameModeText("Los Santos Role-play");
- AllowInteriorWeapons(1);
- EnableTirePopping(1);
- EnableStuntBonusForAll(0);
- SetWorldTime(8);
- AllowAdminTeleport(1);
- ircSay(EchoConnection, EchoChan,"5################");
- ircSay(EchoConnection, EchoChan,"5Cops and Robbers");
- ircSay(EchoConnection, EchoChan,"5Conor & Rob");
- ircSay(EchoConnection, EchoChan,"5Version 0.1");
- ircSay(EchoConnection, EchoChan,"5################");
- // Start player classes
- AddPlayerClass(281,1599.6644,-1708.5675,5.8906,45.8766,0,0,0,0,0,0); // Police Spawn
- AddPlayerClass(29,2815.0498,2254.1252,10.8203,158.6954,0,0,0,0,0,0);
- AddPlayerClass(181,2275.3997,-1785.8702,13.5469,89.0471,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,2065.2036,-1703.4658,14.1484,264.2793,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,2359.7185,-1312.6213,24.0064,310.5691,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(291,2434.1829,-1303.3793,24.9858,261.4407,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(291,2470.1445,-1295.3131,30.2332,84.7753,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,1417.7324,-1133.1401,23.4953,180.7773,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,823.0557,-1103.0114,25.7979,270.0880,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,893.0659,-1335.6842,13.5469,2.1434,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,673.1516,-1247.7721,14.3650,56.7577,0,0,0,0,0,0); // New Spawn Loc - Civil
- AddPlayerClass(181,1123.4525,-2036.9656,69.8871,273.2474,0,0,0,0,0,0); // New Spawn Loc - Civil
- //End player classes
- //Start Vehicles
- AddStaticVehicle(523,1600.8300,-1704.0439,5.4638,89.9668,0,0); // One Police HPV1000
- AddStaticVehicle(523,1600.4983,-1699.5339,5.4635,86.7882,0,0); // One Police HPV1000
- AddStaticVehicle(523,1600.4388,-1696.0068,5.4654,90.3233,0,0); // One Police HPV1000
- AddStaticVehicle(523,1600.3992,-1692.3007,5.4605,88.7182,0,0); // One Police HPV1000
- AddStaticVehicle(596,1544.3599,-1651.3058,5.6115,89.6101,0,1); // Police Car One
- AddStaticVehicle(596,1544.5201,-1655.1956,5.6125,88.3698,0,1); // Police Car One
- AddStaticVehicle(596,1543.8760,-1659.3077,5.6125,87.7498,0,1); // Police Car One
- AddStaticVehicle(596,1543.6902,-1663.4481,5.6099,89.0979,0,1); // Police Car One
- AddStaticVehicle(596,1544.4989,-1667.7994,5.6117,90.9153,0,1); // Police Car One
- AddStaticVehicle(596,1543.4319,-1672.0778,5.6109,89.5247,0,1); // Police Car One
- AddStaticVehicle(596,1543.7888,-1676.1919,5.6120,88.7174,0,1); // Police Car One
- AddStaticVehicle(596,1543.6589,-1680.3679,5.6123,89.7398,0,1); // Police Car One
- AddStaticVehicle(596,1543.9994,-1685.0687,5.6133,89.7598,0,1); // Police Car One
- AddStaticVehicle(427,1569.5237,-1710.2285,6.0225,359.3815,0,1); // Enforcer one
- AddStaticVehicle(427,1574.7559,-1709.6052,6.0225,359.0456,0,1); // Enforcer one
- AddStaticVehicle(427,1578.5295,-1711.5361,6.0389,0.1667,0,1); // Enforcer one
- AddStaticVehicle(427,1583.3787,-1709.6965,6.0226,358.2485,0,1); // Enforcer one
- AddStaticVehicle(599,1595.0172,-1710.9618,6.0828,0.8374,0,1); // Ranger One
- AddStaticVehicle(599,1591.6152,-1708.7189,6.0797,359.6725,0,1); // Ranger Two
- AddStaticVehicle(599,1587.6787,-1709.4913,6.0728,358.3831,0,1); // Ranger Three
- AddStaticVehicle(599,1534.2983,-1645.4298,6.0786,178.8348,0,1); // Ranger Four
- AddStaticVehicle(599,1538.3138,-1645.1105,6.0827,177.9863,0,1); // Ranger Five
- AddStaticVehicle(490,1528.0930,-1688.0781,6.0185,269.8727,0,0); // FBI Rancher One
- AddStaticVehicle(490,1528.6882,-1684.1991,6.0159,271.2697,0,0); // FBI Rancher One
- AddStaticVehicle(490,1585.3507,-1678.8551,6.0236,270.5056,0,0); // FBI Rancher Three
- AddStaticVehicle(490,1585.6072,-1671.4529,6.0213,271.1496,0,0); // FBI Rancher Four
- // End vehicles
- //Start Checkpoints
- bankentercp = CPS_AddCheckpoint(595.0864,-1249.7955,18.2560,8.0,50);
- bankleavecp = CPS_AddCheckpoint(2304.6875,-16.1458,26.7422,2.0,8);
- bankrobcp = CPS_AddCheckpoint(2316.6196,-10.1047,26.7422,3.0,6);
- }
- public OnGameModeExit()
- {
- ircDisconnect(EchoConnection);
- return 1;
- }
- // IRC Shit
- public ircOnConnect(conn)
- {
- // join the echo channel
- if (!TimerSet) SetTimer("EventTimer", 500, 1); // listen for callbacks from this channel
- Connections++; // save number of connections
- ircJoinChan(conn, EchoChan);
- }
- //Start checkpoint entering.. err..
- public OnPlayerEnterCheckpoint(playerid)
- {
- new cpid = CPS_GetPlayerCheckpoint(playerid);
- if(cpid == bankentercp)
- {
- SetPlayerPos(playerid,2310.1270,-15.4618,26.7496);
- SetPlayerFacingAngle(playerid,272.8260);
- SetCameraBehindPlayer(playerid);
- }
- if(cpid == bankleavecp)
- {
- SetPlayerPos(playerid,602.8280,-1240.3810,18.2657);
- SetCameraBehindPlayer(playerid);
- }
- }
- public OnPlayerConnect(playerid)
- {
- new str[100], str2[100], string[100];
- GetPlayerName(playerid, str, 24);
- format(str2, 100, "\2;%s(%d) has joined Los Santos Rolplay v%s\2;", str,playerid,sversion);
- ircSay(EchoConnection, EchoChan,str2);
- format(str, 100, "%s(%d) has joined Los Santos Roleplay v%s", str,playerid,sversion);
- printf("%s",str);
- for(new i=0; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i) && i != playerid) {
- SendClientMessage(i,0x808080AA, str);
- stupidsystem =0;
- }
- }
- SetPlayerColor(playerid,COLOR_GREY);
- SetPlayerVirtualWorld(playerid,0);
- /*format(string, sizeof(string), "Script Version %s",sversion);
- SendClientMessage(playerid,COLOR_WHITE, string);
- SendClientMessage(playerid,0x87CEEBAA, "Welcome.");
- format(string, sizeof(string), "~w~Cop's and Robbers!~n~version %s",sversion);
- GameTextForPlayer(playerid,string, 6000, 0); */
- GameTextForPlayer(playerid,"~w~SARP & THE NEO MR SIR PROJECT GIVE YOU LOS SANTOS ROLEPLAY ",5000,5);
- SendClientMessage(playerid,COLOR_HELP,"Welcome to Los Santos Roleplay! Check out /help to get a sense of direction, And /rules so you aren't confronted by the admins");
- SendClientMessage(playerid,COLOR_HELP2,"Check out our forums & site at saroleplay.com");
- SendClientMessage(playerid,COLOR_HELP,"Enjoy your stay! We hope it is a long one.");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerInterior(playerid,0);
- }
- //START Vehicle Stuff
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) >= 0 && GetPlayerVehicleID(playerid) <= 25)
- {
- if(gTeam[playerid] != TEAM_COP)
- {
- //SetPlayerWantedLevel(playerid,+1);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- SendClientMessage(playerid, 0xA9A9A9AA, "Government Vehicle Theft");
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- }
- }
- }
- //START COMMANDS
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new get = CPS_GetPlayerCheckpoint(playerid);
- new cmd[256];
- new giveplayerid, idx;
- new tmp[256];
- if(strcmp("/robbank", cmdtext, true) ==0)
- {
- if(get == bankrobcp)
- {
- SendClientMessage(playerid,COLOR_RED,"You aren't in the Los Santos Bank checkpoint!");
- }
- if(gTeam[playerid] == TEAM_COP && get == bankrobcp)
- {
- SendClientMessage(playerid,COLOR_RED,"You are a law enforcment officer - You cannot rob the Los Santos Bank!");
- }
- if(gTeam[playerid] == TEAM_CIVIL && get == bankrobcp)
- {
- new getcolor = GetPlayerColor(playerid);
- SendClientMessage(playerid,getcolor,"You have robbed the Los Santos Bank. Law Enforcment has been dispatched");
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- new mrand = random(205000);
- new pname[30];
- GetPlayerName(playerid, pname, 30);
- format(string, sizeof(string), "%s(%d) Has robbed $%d from the Los Santos Bank",pname,playerid,mrand);
- SendClientMessageToAll(0x00C7FFAA, string);
- ircSay(EchoConnection, EchoChan,string);
- format(string, sizeof(string), "%s(%d) Has robbed $%d from the Los Santos Bank",pname,playerid,mrand);
- printf("%s", string);
- format(string, sizeof(string), "~w~ROBBERY ~w~COMPLETE~n~~b~YOU ROBBED~n~~r~ $%d~n~~w~FROM THE BANK", mrand);
- GameTextForPlayer(playerid, string, 7000, 3);
- new pcol = GetPlayerColor(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(string, sizeof(string), "(CASINO ROBBERY) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,string);
- GivePlayerMoney(playerid, mrand);
- }
- }
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new msg[128];
- new name[32];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "\2;%s(%d) has left the server. Reason: (%s)\2;", name,playerid,aDisconnectNames[reason]);
- ircSay(EchoConnection, EchoChan, msg);
- new ConnectName[30], str[100];
- GetPlayerName(playerid, ConnectName, 30);
- switch (reason) {
- case 0: format(str, 256, "%s has left the server! (Timeout)", ConnectName);
- case 1: format(str, 256, "%s has left the server! (Leaving)", ConnectName);
- case 2: format(str, 256, "%s has left the server! (Kicked)", ConnectName);
- }
- SendClientMessageToAll(0x808080AA, str);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerColor(playerid,COLOR_GREY);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid,1206.9768,-32.5926,1000.9531);
- SetPlayerFacingAngle(playerid,249.3010);
- SetPlayerCameraPos(playerid,1209.1083,-33.8061,1000.9531);
- SetPlayerCameraLookAt(playerid,1206.9768,-32.5926,1000.9531);
- switch (classid) {
- case 1:
- {
- GameTextForPlayer(playerid, "~b~POLICE OFFICER", 3000, 5);
- }
- case 2:
- {
- GameTextForPlayer(playerid, "~w~CIVILIAN", 3000, 5);
- }
- }
- return 1;
- }
- /*public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- */
- stock ircIsOp(conn,channel[],user[])
- {
- new ircLevel[3];
- ircGetUserLevel(conn, channel, user, ircLevel);
- if(!strcmp(ircLevel, "~", true,1) || !strcmp(ircLevel, "&", true,1) || !strcmp(ircLevel, "@", true,1)) return 1;
- return 0;
- }
- stock ircIsHalfOp(conn,channel[],user[])
- {
- new ircLevel[3];
- ircGetUserLevel(conn, channel, user, ircLevel);
- if(!strcmp(ircLevel, "%", true,1)) return 1;
- return 0;
- }
- stock ircHasVoice(conn,channel[],user[])
- {
- new ircLevel[4];
- ircGetUserLevel(conn, channel, user, ircLevel);
- if(!strcmp(ircLevel, "+", true,1)) return 1;
- return 0;
- }
- public ircOnUserSay(conn, channel[], user[], message[])
- {
- if (channel[0] != '#') return 0;
- if (message[0] != '!') return 1; // we only want messages starting with ~
- new space = (strfind(message, " ")); // find the location of the space
- new cmdlen; // holds the length of the command
- if (space>=1) // do we have a space?
- {
- new lenmsg = strlen(message); // get the length of the entire message
- cmdlen = ((lenmsg-(lenmsg-space))-1); // generate length of command
- }
- else
- {
- cmdlen = (strlen(message)-1); // generate the length of command
- }
- if (cmdlen == 3) // is our command 3 characters long?
- {
- irccmd(say,3,conn,channel,user,message);
- irccmd(ban,3,conn,channel,user,message);
- irccmd(gmx,3,conn,channel,user,message);
- }
- else if (cmdlen == 4) //is our command 4 characters long?
- {
- irccmd(mute,4,conn,channel,user,message);
- irccmd(join,4,conn,channel,user,message);
- irccmd(kick,4,conn,channel,user,message);
- //irccmd(warn,4,conn,channel,user,message);
- }
- else if (cmdlen == 5) // commands 5 chars
- {
- irccmd(unban,5,conn,channel,user,message);
- }
- else if (cmdlen == 6) // commands 6 chars
- {
- irccmd(unmute,6,conn,channel,user,message);
- }
- else if (cmdlen == 7)
- {
- irccmd(unbanip,7,conn,channel,user,message);
- }
- return 1;
- }
- irccmd_warn(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user) && !ircIsHalfOp(conn,channel,user)) return false;
- new playerName[25];
- new strMsg[150];
- new giveplayerid[25];
- for(new a=0; a<=MAX_PLAYERS; a++)
- {
- if(IsPlayerConnected(a))
- {
- GetPlayerName(a,playerName,16);
- giveplayerid = GetPlayerID(playerName,1);
- new space = (strfind(playerName, params));
- if(space != -1)
- {
- format(strMsg, sizeof(strMsg), "**(ADMIN WARN)** \2;%s(%d)\2;", playerName,a);
- SendClientMessageToAll(0xFF7F50AA, strMsg);
- ircSay(conn,channel,strMsg);
- new rpwarnings =0;
- rpwarnings =dUserINT(playerName).("rpabusewar");
- rpwarnings +=1;
- if(rpwarnings >=3) {
- SetPlayerInterior(giveplayerid,10);
- SetPlayerPos(giveplayerid,219.6257,111.2549,999.0156);
- SetPlayerFacingAngle(giveplayerid,2.2339);
- SetCameraBehindPlayer(giveplayerid);
- GetPlayerName(giveplayerid, string, 24);
- format(string, 100, "**(AUTO KICK)** %s(%d) Too many admin warnings.",string,giveplayerid);
- SendClientMessageToAll(0xFF7F50AA, string);
- printf("%s", string);
- dUserSetINT(PlayerName(giveplayerid)).("rpabusewar",0);
- Kicking[giveplayerid] = 1;
- SetTimer("KickPlayer",700,0);
- }
- else {
- if(rpwarnings <=2) {
- new output[255];
- AdminKilled[giveplayerid] =1;s
- SendClientMessageToAll(0xFF7F50AA, string);
- SendClientMessage(giveplayerid,COLOR_RED,"YOU HAVE BEEN WARNED BY SERVER ADMIN.");
- SendClientMessage(giveplayerid,COLOR_RED,"Further abuse will result in more warnings and possible a kick/ban");
- SendClientMessage(giveplayerid,COLOR_RED,"Visit www.lvrcr.com for details or speak to a server admin");
- dUserSetINT(PlayerName(giveplayerid)).("rpabusewar",rpwarnings);
- }
- }
- return true;
- }
- }
- }
- format(strMsg, sizeof(strMsg), "2*** \2;%s\2; is not found on the server.", params);
- ircSay(conn,channel,strMsg);
- return true;
- }
- irccmd_unban(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user)) return false;
- printinfo
- dUserSetINT(params).("nameban",0);
- new strMsg[150];
- format(strMsg, sizeof(strMsg), "%s Unbanned.", params);
- ircSay(conn,channel,strMsg);
- return true;
- }
- irccmd_unbanip(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user)) return false;
- printinfo
- new strMsg[150];
- new strMsg2[150];
- format(strMsg2, sizeof(strMsg2), "PRIVMSG %s %s unbanned, %s.", user, params, user);
- ircSendRawData(conn, strMsg2);
- format(strMsg, sizeof(strMsg), "unbanip %s", params);
- //ircSay(conn,channel,strMsg);
- SendRconCommand(strMsg);
- return true;
- }
- irccmd_gmx(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user)) return false;
- printinfo
- SendRconCommand("gmx");
- return true;
- }
- irccmd_unmute(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user) && !ircIsHalfOp(conn,channel,user)) return false;
- printinfo
- new playerName[25];
- new strMsg[150];
- for(new a=0; a<=MAX_PLAYERS; a++)
- {
- if(IsPlayerConnected(a))
- {
- GetPlayerName(a,playerName,16);
- new space = (strfind(playerName, params));
- if(space != -1)
- {
- format(strMsg, sizeof(strMsg), "**(ADMIN UNMUTE)** \2;%s(%d)\2;", playerName,a);
- SendClientMessageToAll(0xFF7F50AA, strMsg);
- ircSay(conn,channel,strMsg);
- // Muted[a] =0;
- return true;
- }
- }
- }
- format(strMsg, sizeof(strMsg), "2*** \2;%s\2; is not found on the server.", params);
- ircSay(conn,channel,strMsg);
- return true;
- }
- irccmd_mute(conn, channel[], user[], params[])
- {
- if(!ircIsOp(conn,channel,user) && !ircIsHalfOp(conn,channel,user)) return false;
- printinfo
- new playerName[25];
- new strMsg[150];
- for(new a=0; a<=MAX_PLAYERS; a++)
- {
- if(IsPlayerConnected(a))
- {
- GetPlayerName(a,playerName,16);
- new space = (strfind(playerName, params));
- if(space != -1)
- {
- format(strMsg, sizeof(strMsg), "**(ADMIN MUTE)** \2;%s(%d)\2;", playerName,a);
- SendClientMessageToAll(0xFF7F50AA, strMsg);
- ircSay(conn,channel,strMsg);
- // Muted[a] =1;
- return true;
- }
- }
- }
- format(strMsg, sizeof(strMsg), "2*** \2;%s\2; is not found on the server.", params);
- ircSay(conn,channel,strMsg);
- return true;
- }
- irccmd_say(conn, channel[], user[], params[])
- {
- if (!ircIsOp(conn,channel,user) && !ircHasVoice(conn,channel,user) && !ircIsHalfOp(conn,channel,user)) return false;
- printinfo
- new msg[112];
- format(msg,sizeof(msg), "%s(IRC) %s", user, params);
- SendClientMessageToAll(0x2587CEAA, msg);
- format(msg, sizeof(msg), "%s(IRC) %s", user, params);
- ircSay(conn, channel, msg);
- return true;
- }
- irccmd_join(conn, channel[], user[], params[])
- {
- if (!ircIsOp(conn,channel,user)) return false;
- printinfo
- new strmessage[64];
- format(strmessage, sizeof(strmessage), "2*** Joining channel \2;%s's\2;...", params);
- ircSay(conn, channel, strmessage);
- ircJoinChan(conn, params);
- return true;
- }
- irccmd_kick(conn, channel[], user[], params[]) // supports kicking by partial nickname
- {
- if (!ircIsOp(conn,channel,user) && !ircIsHalfOp(conn,channel,user)) return false;
- printinfo
- new strname[25];
- new strmessage[150];
- for (new a=0; a<=MAX_PLAYERS; a++)
- {
- if (IsPlayerConnected(a))
- {
- GetPlayerName(a,strname,16);
- new space = (strfind(strname, params));
- if (space != -1)
- {
- format(strmessage, sizeof(strmessage), "**(ADMIN KICK)** \2;%s(%d)\2;", strname,a);
- SendClientMessageToAll(0xFF7F50AA, strmessage);
- ircSay(conn,channel,strmessage);
- // Kicking[a] =1;
- SetTimer("KickPlayer",700,0);
- return true;
- }
- }
- }
- format(strmessage, sizeof(strmessage), "2*** \2;%s\2; is not found on the server.", params);
- ircSay(conn,channel,strmessage);
- return true;
- }
- irccmd_ban(conn, channel[], user[], params[]) // supports banning by partial nickname
- {
- if (!ircIsOp(conn,channel,user)) return false;
- printinfo
- new strname[25];
- new strmessage[150];
- for (new a=0; a<=MAX_PLAYERS; a++)
- {
- if (IsPlayerConnected(a))
- {
- GetPlayerName(a,strname,16);
- new space = (strfind(params, strname));
- if (space != -1)
- {
- format(strmessage, sizeof(strmessage), "**(ADMIN BAN)** \2;%s(%d)\2;", strname,a);
- SendClientMessageToAll(0xFF7F50AA, strmessage);
- ircSay(conn,channel,strmessage);
- // if(udb_Exists(PlayerName(a)) && PLAYERLIST_authed[a]) {
- // dUserSetINT(PlayerName(a)).("nameban",1);
- // }
- // Banning[a] = 1;
- // SetTimer("BanPlayer",700,0);
- return true;
- }
- }
- }
- format(strmessage, sizeof(strmessage), "2*** \2;%s\2; is not found on the server.", params);
- ircSay(conn,channel,strmessage);
- return true;
- }
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
