Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Credits to Y_Less, Dracoblue and Kush.
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <sscanf2>
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_BRIGHTRED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLUE 0x3A47DEFF
- #define COLOR_TAN 0xBDB76BAA
- #define COLOR_PURPLE 0x800080AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_BLACK 0x00000000
- #define COLOR_DARKGREY 0x696969FF
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define PATH "/Users/%s.ini"
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pBanned,
- pScore,
- pDeaths
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new IsSpectating[MAX_PLAYERS];
- new PlayerText:ConnectTD[12];
- forward SendAdminMessage(msg[]);
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("Score",PlayerInfo[playerid][pScore]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- /*Credits 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;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- TextDrawCreate(240.0,580.0,"Welcome to Critical TDM");
- // Disables the yellow arrows
- DisableInteriorEnterExits();
- // Gamemode
- SetGameModeText("Critical DM V.0.1");
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason) //This code gets called when somebody dies.
- {
- PlayerInfo[killerid][pKills] ++; //incraseing killerid kils for one more
- PlayerInfo[playerid][pDeaths] ++; //increase player deaths for one more
- PlayerInfo[playerid][pScore] ++;
- if(IsPlayerConnected(killerid)) //Checks if there really is a "killer" - more ways of death are for example falling from great heights, so there isn't a killer there!
- {
- SetPlayerScore(killerid,GetPlayerScore(playerid)+5);
- GivePlayerMoney(killerid, 500); //Give the player 500 dollars
- SendClientMessage(killerid, COLOR_LIGHTBLUE, "*You have won $500 and 5 scores from killing someone*"); // Send message to killer
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- SendClientMessage(playerid, 0xFFFF00AA, "You have entered a vehicle");
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- SendClientMessage(playerid, 0xFFFF00AA, "You have exited a vehicle");
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- 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)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- 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_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
- 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,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Score",0);
- INI_Close(File);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! now you have succesfully registered","Ok","");
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new id, reason[128];
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /kick [id/name][reason]");
- else if(id==playerid)SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not kick yourself!");
- else if(IsPlayerAdmin(id))SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not kick another admin!");
- else if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: Player is not connected!");
- else {
- new Name[MAX_PLAYER_NAME], KickMessage[128];
- new Name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(KickMessage, sizeof(KickMessage), "Administrator %s(%d) has kicked player %s(%d)| Reason: %s", Name, playerid, Name2, id);
- SendClientMessageToAll(COLOR_LIGHTBLUE, KickMessage);
- Kick(id);
- }
- return 1;
- }
- CMD:warn(playerid, params[])
- {
- new id, reason[128];
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, COLOR_LIGHTBLUE,"Usage: /warn [id/name] [reason]");
- else if(id==playerid)SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not warn yourself!");
- else if(IsPlayerAdmin(id))SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not warn another admin!");
- else if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: Player is not connected!");
- else
- {
- new Name[MAX_PLAYER_NAME], WarnMessage[128];
- new Name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(WarnMessage, sizeof(WarnMessage), "Administrator %s(%d) has warned %s(%d) | Reason: %s", Name, playerid, Name2, id);
- SendClientMessageToAll(COLOR_LIGHTBLUE, WarnMessage);
- }
- return 1;
- }
- CMD:ban(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new id;
- new tmp[256], tmp2[256], Index;
- tmp = strtok(params,Index), tmp2 = strtok(params,Index);
- if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /ban [id/name] [reason]"); //Check If Player Does Not Added "Reason and the ID"
- if(IsPlayerAdmin(id))SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not kick another admin!");
- if(id==playerid)SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You can not kick yourself!");
- new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
- player1 = strval(tmp); // << player1 = ID of The Player
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: Player is not connected!"); //<< Check If Player Connected Or Not
- GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
- GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
- format(string,sizeof(string),"Administrator %s has banned %s | Reason ( %s )",adminname,playername,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
- SendClientMessageToAll(COLOR_LIGHTBLUE,string); // Send Message To all Players.
- Ban(player1);
- }
- else return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You're not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
- return 1;
- }
- CMD:rangeban(playerid, params[]) {
- new id;
- new reason[50];
- if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(sscanf(params, "us[50]", id,reason)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[USAGE] - /rangeban [ID] [REASON]");
- if(PlayerInfo[id][pAdmin] == 7) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "* One does not simply range-ban the server owner!");
- new string[150], sender[MAX_PLAYER_NAME], receiver[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sender, sizeof(sender));
- GetPlayerName(id, receiver, sizeof(receiver));
- //new rbandate[3];
- //getdate(rbandate[0], rbandate[1], rbandate[2]);
- format(string, sizeof(string), "[BAN] - %s(%d) has been banned by %s(%d)", receiver, id, sender, playerid);
- SendClientMessageToAll(COLOR_LIGHTBLUE, string); //Sends the kick message, as seen above ^.
- format(string, sizeof(string), "[BAN] - Reason: %s", reason);
- SendClientMessageToAll(COLOR_LIGHTBLUE, string); //Sends the kick reasons message, as seen above ^
- SetTimerEx("KickTimer", 500, false, "i", id); //Sets KickTimer to 1 seond(will be kicked after 1 second)
- PlayerInfo[id][pBanned] = 1;
- SendClientMessage(id, COLOR_LIGHTBLUE, "[BAN] - You've been BANNED"); //Sends Target a message, saying that he was kicked.
- SendClientMessage(id, COLOR_LIGHTBLUE, "[BAN] - For more info read the chat.");
- //{FFFFFF}%s\n\n{FF002B}Reason: {FFFFFF}%s\n\n{FF002B}Date: {FFFFFF}%02d/%02d/%04d\n\n{FFFFFF}Press F8 to take a screenshot and use this in unban appeal!", pname, playerid,Reason, rbandate[2], rbandate[1], rbandate[0]);
- new ip[50];
- GetPlayerIp(id,ip,sizeof(ip));
- strdel(ip,strlen(ip)-4,strlen(ip));
- format(ip,sizeof(ip),"%s**.**",ip);
- format(ip,sizeof(ip),"banip %s",ip);
- SendRconCommand(ip);
- printf("ADMIN %s has RANGE BANNED %s FOR: %s", sender, receiver, reason);
- new INI:File = INI_Open(UserPath(id));
- INI_SetTag(File,"ban info");
- INI_WriteString(File,"RANGE-Banned By", sender);
- INI_WriteString(File,"Reason", reason);
- INI_Close(File);
- return 1;
- }
- CMD:announce(playerid, params[])
- {
- new string[128];
- if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(!strlen(params))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /announce [message]");
- return 1;
- }
- format(string, sizeof(string), "%s", params);
- GameTextForAll(string, 5000, 0);
- return 1;
- }
- CMD:spec(playerid, params[])
- {
- new ID;
- new pname[128];
- GetPlayerName(ID, pname, sizeof(pname));
- if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(sscanf(params, "i", ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /spec (playerid)");
- return 1;
- }
- if(!IsPlayerConnected(ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Invalid player ID");
- return 1;
- }
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, ID);
- SetPlayerInterior(playerid, ID);
- SetPlayerInterior(playerid, GetPlayerInterior(ID));
- IsSpectating[playerid] =1;
- return 1;
- }
- CMD:specoff(playerid, params[])
- {
- #pragma unused params
- if(IsSpectating[playerid] == 1)
- {
- TogglePlayerSpectating(playerid, 0);
- IsSpectating[playerid] =0;
- return 1;
- }
- return 1;
- }
- CMD:asay(playerid, params[])
- {
- new string[128];
- new pname[128];
- GetPlayerName(playerid, pname, sizeof(pname));
- if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(!strlen(params))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /asay (message)");
- return 1;
- }
- format(string, sizeof(string), "[ADMIN CHAT] %s(%d): %s", pname, playerid, params);
- SendAdminMessage(string);
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- new string[128];
- new ID;
- new pname[128];
- GetPlayerName(ID, pname, sizeof(pname));
- if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(sscanf(params, "i", ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /goto (playerid)");
- return 1;
- }
- if(!IsPlayerConnected(ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "That player ID is not connected.");
- return 1;
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(ID, x, y, z);
- SetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid,x+1,y,z);
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(ID));
- SetPlayerInterior(playerid,GetPlayerInterior(ID));
- format(string, sizeof(string), "You have teleported to %s(%d)", pname, ID);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- CMD:bring(playerid, params[])
- {
- new string[128];
- new ID;
- new pname[128];
- GetPlayerName(ID, pname, sizeof(pname));
- if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- if(sscanf(params, "i", ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /bring (playerid)");
- return 1;
- }
- if(!IsPlayerConnected(ID))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Invalid player ID");
- return 1;
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(ID, x+1, y, z);
- SetPlayerVirtualWorld(ID, GetPlayerVirtualWorld(playerid));
- SetPlayerInterior(ID, GetPlayerInterior(playerid));
- format(string, sizeof(string), "You have brought %s(%d) to you.", pname, ID);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- CMD:setscore(playerid, params[])
- {
- new id, score;
- if(sscanf(params, "ud", id, score) ) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /setscore [id] [score]");
- if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You set the score");
- SetPlayerScore(id, score);
- return 1;
- }
- CMD:setmoney(playerid, params[])
- {
- new id, cash;
- if(sscanf(params, "ud", id, cash) ) return SendClientMessage(playerid, -COLOR_LIGHTBLUE, "Usage: /setcash [id] [cash]");
- if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, -COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You set the cash");
- GivePlayerMoney(id, cash);
- return 1;
- }
- CMD:acmds(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You're not authorized to use this command!");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome to Critical DM admin commands list!");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"[STATISTICS] /ban /rangeban /setscore /setmoney");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"[PLAYER] /warn /kick /spec /specoff /goto /bring");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"[PUBLIC] /announce /asay");
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, 0xFFFFFFAA, "You have successfully killed yourself");
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public SendAdminMessage(msg[])
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerAdmin(i))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, msg);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement