Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum pInfo
- {
- [MoB],
- var_[MoB]HighLight[2],
- MoBOLDRank,
- };
- public OnPlayerConnect(playerid)
- {
- PlayerInfo[playerid][MoB] = 0;
- PlayerInfo[playerid][var_MoBHighLight][0] = 0;
- PlayerInfo[playerid][var_MoBHighLight][1] = 0;
- }
- public OnPlayerDisconnect(playerid)
- {
- if(PlayerInfo[playerid][var_MoBHighLight][0] > 0)
- {
- KillTimer(PlayerInfo[playerid][var_MoBHighLight][1]);
- PlayerInfo[playerid][var_MoBHighLight][0] = 0;
- PlayerInfo[playerid][var_MoBHighLight][1] = 0;
- }
- }
- new MoBRanks[11][1][40] =
- {
- { "Not Member" },
- { "Newbie" },
- { "Honored" },
- { "Trusted" },
- { "Elite" },
- { "Assistant" },
- { "Co-Leader" },
- { "Leader" },
- { "Co-Manager" },
- { "Manager" },
- { "Ceo" }
- };
- new MoBRanksColors[10][1] =
- {
- { 0xFF9900AA },
- { 0xD2691EAA },
- { 0x33CCFFAA },
- { 0x0000BBAA },
- { 0xFFFFFFAA },
- { 0xC0C0C0AA },
- { 0xFFFF00AA },
- { 0xF6BB0AA },
- { 0xFF0000AA },
- { 0x33FF33AA }
- };
- new MoBHighLightColors[2][1] =
- {
- { 0xAA3333AA },
- { 0x000000AA }
- };
- CMD:mobhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- new Handle[2500];
- strcat(Handle, "{00FFFF}/MoBmembers {FFFFFF}| {1aa3ff}Shows You The Online MoB Members!{FFFFFF}.\n");
- strcat(Handle, "{00FFFF}/MoBWeaps {FFFFFF}| {1aa3ff}Gives You MoB Weapons.\n");
- strcat(Handle, "{00FFFF}/MoBCar1 {FFFFFF}| {1aa3ff}Gives You MoB Car Model 1.\n");
- strcat(Handle, "{00FFFF}/MoBCar2 {FFFFFF}| {1aa3ff}Gives You MoB Car Model 2.\n");
- strcat(Handle, "{00FFFF}/MoBBike1 {FFFFFF}| {1aa3ff}Gives You MoB Bike Model 1.\n");
- strcat(Handle, "{00FFFF}/MoBBike2 {FFFFFF}| {1aa3ff}Gives You MoB Bike Model 2.\n");
- strcat(Handle, "{00FFFF}/MoBSkin1 {FFFFFF}| {1aa3ff}Gives You MoB Skin Model 1.\n");
- strcat(Handle, "{00FFFF}/MoBSkin2 {FFFFFF}| {1aa3ff}Gives You MoB Skin Model 2.\n");
- strcat(Handle, "{00FFFF}/MoBSkin3 {FFFFFF}| {1aa3ff}Gives You MoB Skin Model 3.\n");
- strcat(Handle, "{00FFFF}/MoBhighlight {FFFFFF}| {1aa3ff}Gives You MoB Highlight [ {FFFF00}Name Color Highlights {1aa3ff}]{FFFFFF}.\n");
- strcat(Handle, "{00FFFF}/MoBann {FFFFFF}| {1aa3ff}Announces A Text For MoB Members{FFFFFF}.\n");
- strcat(Handle, "{00FFFF}/SetTempMoB {FFFFFF}| {1aa3ff}Sets A Player MoB Member For Temp Period Time Member [ {FFFF00}Usage: /SetTempmob PlayerID Rank {1aa3ff}]{FFFFFF}.\n");
- strcat(Handle, "{00FFFF}/SETMoB {FFFFFF}| {1aa3ff}Sets A Player MoB Member [ {FFFF00}Usage: /SETmob PlayerID Rank {1aa3ff}]{FFFFFF}.\n");
- strcat(Handle, "{00FFFF}/OsetMoB {FFFFFF}|{1aa3ff} Sets A Player MoB Member By His Name [ {FFFF00}Usage: /Osetmob PlayerName Rank {1aa3ff}]{FFFFFF}.\n");
- strcat(Handle, "\t\t\t{00FFFF}Commands By: {DC143C}****{33FF33}BlackTurbo{DC143C}****");
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{FFFF00}MoB Commands", Handle, "Close", "");
- CMDMessageToMoB(playerid, "MoBHELP");
- }
- return 1;
- }
- CMD:mobmembers(playerid, params[])
- {
- if(PlayerInfo[playerid][Registered] && PlayerInfo[playerid][LoggedIn])
- {
- new
- string[180],
- counter = 0
- ;
- SendClientMessage(playerid, 0xFF0000AA, " ");
- SendClientMessage(playerid, 0x00FFFFAA, "__________ |- Online {FFFF00}Murder members {00FFFF}Members -| __________");
- SendClientMessage(playerid, 0xFF0000AA, " ");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][MoB])
- {
- if(!PlayerInfo[i][Registered])
- {
- PlayerInfo[i][MoB] = 0;
- }
- else
- {
- format(string, 128, "Rank: %d - %s (Id:%i) | %s |",PlayerInfo[i][MoB], pName(i), i, MoBRanks[PlayerInfo[i][MoB]][0][0]);
- SendClientMessage(playerid, MoBRanksColors[ PlayerInfo[i][MoB] - 1 ][0], string);
- counter++;
- }
- }
- }
- }
- if(!counter)
- {
- SendClientMessage(playerid,0xFF0000AA,"There're no Murder members member onlline");
- }
- SendClientMessage(playerid, 0x00FFFFAA, "___________________________________________");
- }
- else
- {
- SendClientMessage(playerid, red, "ERROR: You need to be registered and loggedin to use this command!");
- }
- return 1;
- }
- CMD:mobweaps(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 2)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 2 to use this command!");
- }
- else
- {
- GivePlayerWeapon(playerid, 4, 1000);
- GivePlayerWeapon(playerid, 31, 1000);
- GivePlayerWeapon(playerid, 42, 1000);
- GivePlayerWeapon(playerid, 28, 1000);
- GivePlayerWeapon(playerid, 26, 1000);
- GivePlayerWeapon(playerid, 34, 1000);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 16, 1000);
- new string[140];
- format(string, sizeof string,"[INFO]: %s have used MoB weapons | **/MoBWeaps** |", pName(playerid));
- SendClientMessageToAll(red, string);
- CMDMessageToMoB(playerid, "MoBWEAPS");
- }
- return 1;
- }
- CMD:mobcar1(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, red, "ERROR: You're already inside a vehicle!");
- }
- else
- {
- CarSpawner(playerid, 520);
- CMDMessageToMoB(playerid, "MoBCAR1");
- SendClientMessage(playerid, blue, "Enjoy With MoB Car!");
- }
- }
- return 1;
- }
- CMD:mobcar2(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, red, "ERROR: You're already inside a vehicle!");
- }
- else
- {
- CarSpawner(playerid, 425);
- CMDMessageToMoB(playerid, "MoBCAR2");
- SendClientMessage(playerid, blue, "Enjoy With MoB Car!");
- }
- }
- return 1;
- }
- CMD:mobbike1(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, red, "ERROR: You're already inside a vehicle!");
- }
- else
- {
- CarSpawner(playerid, 411);
- CMDMessageToMoB(playerid, "MoBBIKE1");
- SendClientMessage(playerid, blue, "Enjoy With MoB Bike!");
- }
- }
- return 1;
- }
- CMD:mobbike2(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, red, "ERROR: You're already inside a vehicle!");
- }
- else
- {
- CarSpawner(playerid, 579);
- CMDMessageToMoB(playerid, "MoBBIKE1");
- SendClientMessage(playerid, blue, "Enjoy With MoB Bike!");
- }
- }
- return 1;
- }
- CMD:mobskin1(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- SetPlayerSkin(playerid, 61);
- CMDMessageToMoB(playerid, "MoBSKIN1");
- SendClientMessage(playerid, blue, "Enjoy With MoB Skin!");
- }
- return 1;
- }
- CMD:mobskin2(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 4)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 4 to use this command!");
- }
- else
- {
- SetPlayerSkin(playerid, 287);
- CMDMessageToMoB(playerid, "MoBSKIN2");
- SendClientMessage(playerid, blue, "Enjoy With MoB Skin!");
- }
- return 1;
- }
- CMD:mobskin3(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 8)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 8 to use this command!");
- }
- else
- {
- SetPlayerSkin(playerid, 83);
- CMDMessageToMoB(playerid, "MoBSKIN3");
- SendClientMessage(playerid, blue, "Enjoy With MoB Skin!");
- }
- return 1;
- }
- CMD:mobann(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 4)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 4 to use this command!");
- }
- else
- {
- if(isnull(params))
- {
- SendClientMessage(playerid, red,"Usage: /mobann [text]");
- }
- else
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][MoB])
- {
- GameTextForPlayer(playerid, params, 4000, 3);
- }
- }
- }
- CMDMessageToMoB(playerid, "MoBANN");
- }
- }
- return 1;
- }
- CMD:mob(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 1)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 1 to use this command!");
- }
- else
- {
- if(isnull(params))
- {
- SendClientMessage(playerid, red, "Usage: /mob [text]");
- }
- else
- {
- new string[148];
- format(string, sizeof string,"[MoB - %s] - %s(%d){00FFFF}: %s",MoBRanks[PlayerInfo[playerid][MoB]][0][0], pName(playerid), playerid, params);
- MessageToMoB(MoBRanksColors[ PlayerInfo[playerid][MoB] - 1 ][0], string);
- }
- }
- return 1;
- }
- CMD:settempmob(playerid,params[]) {
- if(PlayerInfo[playerid][LoggedIn] == 1)
- {
- if(PlayerInfo[playerid][MoB] < 8)
- {
- ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "ERROR", "You need to be MoB rank 8 to use this command!", "Close", "");
- }
- else
- {
- new
- player1,
- level,
- playername[MAX_PLAYER_NAME],
- adminname[MAX_PLAYER_NAME],
- string[128],
- tmp[128],
- tmp2[128],
- Index
- ;
- tmp = strtok(params, Index);
- tmp2 = strtok(params, Index);
- if(isnull(params))
- {
- SendClientMessage(playerid, 0xFF0000AA, "USAGE: /settempmob [playerid] [level]");
- SendClientMessage(playerid, orange, "Function: Will set temp the Level of MoB of the Specific Player");
- }
- else
- {
- player1 = strval(tmp);
- if(isnull(tmp2))
- {
- SendClientMessage(playerid, 0xFF0000AA, "USAGE: /settempmob [playerid] [level]");
- SendClientMessage(playerid, orange, "Function: Will set temp the Level of MoB of the Specific Player");
- }
- else
- {
- level = strval(tmp2);
- if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[player1][LoggedIn] == 1)
- {
- if(level > 10)
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Max MoB Level is 10");
- }
- else
- {
- if(level == PlayerInfo[player1][MoB])
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Player is already this MoB level");
- }
- else
- {
- CMDMessageToMoB(playerid,"SETTEMPMoB");
- GetPlayerName(player1, playername, sizeof(playername));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- new
- year,
- month,
- day
- ;
- getdate(year, month, day);
- new
- hour,
- minute,
- second
- ;
- gettime(hour,minute,second);
- if(level > 0)
- {
- format(string,sizeof(string)," %s has set your MoB Status to level %d",adminname, level);
- }
- else
- {
- format(string,sizeof(string)," %s has set your MoB Status to level %d",adminname, level);
- }
- SendClientMessage(player1,0x00FFFFAA,string);
- if(level > PlayerInfo[player1][MoB])
- {
- GameTextForPlayer(player1,"~g~MoB LEVEL UP", 2000, 3);
- }
- else
- {
- GameTextForPlayer(player1,"~r~MoB LEVEL DOWN", 2000, 3);
- }
- format(string,sizeof(string),"You have made %s MoB Temp Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second);
- SendClientMessage(playerid,0x00FFFFAA,string);
- format(string,sizeof(string),"%s has made %s MoB Temp Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
- PlayerInfo[player1][MoB] = level;
- PlayerPlaySound(player1,1057,0.0,0.0,0.0);
- }
- }
- }
- else
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Player must be registered and logged in to be set as a MoB member");
- }
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "Player is not connected");
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: You must be logged in to use this command");
- }
- return 1;
- }
- CMD:setmob(playerid,params[]) {
- if(PlayerInfo[playerid][LoggedIn] == 1)
- {
- if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][MoB] < 8)
- {
- ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{FF0000}ERROR", "You need to be MoB rank 8 to use this command", "Close", "");
- }
- else
- {
- new
- player1,
- level,
- playername[MAX_PLAYER_NAME],
- adminname[MAX_PLAYER_NAME],
- string[128],
- tmp[128],
- tmp2[128],
- Index
- ;
- tmp = strtok(params, Index);
- tmp2 = strtok(params, Index);
- if(isnull(params))
- {
- SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setmob [playerid] [level]");
- SendClientMessage(playerid, orange, "Function: Will set the Level of MoB of the Specific Player");
- }
- else
- {
- player1 = strval(tmp);
- if(isnull(tmp2))
- {
- SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setmob [playerid] [level]");
- SendClientMessage(playerid, orange, "Function: Will set the Level of MoB of the Specific Player");
- }
- else
- {
- level = strval(tmp2);
- if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[player1][LoggedIn] == 1)
- {
- if(level > 10)
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Max MoB Level is 10");
- }
- else
- {
- if(level == PlayerInfo[player1][MoB])
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Player is already this MoB level");
- }
- else
- {
- CMDMessageToAdmins(playerid,"SETMoB");
- CMDMessageToMoB(playerid,"SETMoB");
- GetPlayerName(player1, playername, sizeof(playername));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- new
- year,
- month,
- day
- ;
- getdate(year, month, day);
- new
- hour,
- minute,
- second
- ;
- gettime(hour,minute,second);
- if(level > 0)
- {
- format(string,sizeof(string)," %s has set your MoB Status to level %d",adminname, level);
- }
- else
- {
- format(string,sizeof(string)," %s has set your MoB Status to level %d",adminname, level);
- }
- SendClientMessage(player1,0x00FFFFAA,string);
- if(level > PlayerInfo[player1][MoB])
- {
- GameTextForPlayer(player1,"~g~MoB LEVEL UP", 2000, 3);
- }
- else
- {
- GameTextForPlayer(player1,"~r~MoB LEVEL DOWN", 2000, 3);
- }
- format(string,sizeof(string),"You have made %s MoB Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second);
- SendClientMessage(playerid,0x00FFFFAA,string);
- format(string,sizeof(string),"%s has made %s MoB Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
- SaveToFile("MoBmembers",string);
- dUserSetINT(pName(player1)).("MoB",(level));
- PlayerInfo[player1][MoB] = level;
- PlayerPlaySound(player1,1057,0.0,0.0,0.0);
- }
- }
- }
- else
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: Player must be registered and logged in to be set as a MoB member");
- }
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "Player is not connected");
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid,0xFF0000AA,"ERROR: You must be logged in to use this command");
- }
- return 1;
- }
- CMD:osetmob(playerid,params[])
- {
- if(PlayerInfo[playerid][MoB] < 8)
- {
- SendClientMessage(playerid, red, "You need to be MoB rank 8 to use this command!");
- }
- else
- {
- new
- file[256],
- string[120],
- tmp[128],
- tmp2[128],
- Index
- ;
- tmp = strtok(params,Index);
- tmp2 = strtok(params,Index);
- if(isnull(params))
- {
- SendClientMessage(playerid, red, "USAGE: /osetmob [name] [level]");
- }
- else
- {
- if(isnull(tmp2))
- {
- SendClientMessage(playerid, red, "ERROR: You must input a level");
- }
- else
- {
- format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(tmp));
- if(!fexist(file))
- {
- SendClientMessage(playerid, red, "ERROR: that account doesn't even exist!");
- }
- else
- {
- dini_Set(file,"MoB",tmp2);
- CMDMessageToMoB(playerid,"OSETMoB");
- new
- year,
- month,
- day
- ;
- getdate(year, month, day);
- new
- hour,
- minute,
- second
- ;
- gettime(hour,minute,second);
- format(string,sizeof(string),"You have set %s's MoB level to %s on %d/%d/%d at %d:%d:%d",tmp,tmp2 ,day, month, year, hour, minute, second );
- SendClientMessage(playerid,blue,string);
- }
- }
- }
- }
- return 1;
- }
- CMD:mobhighlight(playerid, params[])
- {
- if(PlayerInfo[playerid][MoB] < 4)
- {
- SendClientMessage(playerid, red,"ERROR: You need to be rank 4 to use this command!");
- }
- else
- {
- if(PlayerInfo[playerid][var_MoBHighLight][0] > 0)
- {
- KillTimer(PlayerInfo[playerid][var_MoBHighLight][1]);
- PlayerInfo[playerid][var_MoBHighLight][0] = 0;
- PlayerInfo[playerid][var_MoBHighLight][1] = 0;
- SendClientMessage(playerid, blue, "Successfully turned MoB highlight off!");
- CMDMessageToMoB(playerid, "MoBHIGHLIGHT");
- SetPlayerColor(playerid, PlayerInfo[playerid][MoBOLDRank]);
- }
- else
- {
- PlayerInfo[playerid][MoBOLDRank] = GetPlayerColor(playerid);
- PlayerInfo[playerid][var_MoBHighLight][0] = 1;
- PlayerInfo[playerid][var_MoBHighLight][1] = SetTimerEx("MoBHighLight", 1000, 1, "i", playerid);
- SendClientMessage(playerid, blue, "Successfully turned MoB highlight on!");
- CMDMessageToMoB(playerid, "MoBHIGHLIGHT");
- }
- }
- return 1;
- }
- forward public MoBHighLight(playerid);
- public MoBHighLight(playerid)
- {
- if(PlayerInfo[playerid][var_MoBHighLight][0] >= (sizeof(MoBHighLightColors)))
- {
- PlayerInfo[playerid][var_MoBHighLight][0] = 0;
- }
- SetPlayerColor(playerid, MoBHighLightColors[PlayerInfo[playerid][var_MoBHighLight][0]][0]);
- PlayerInfo[playerid][var_MoBHighLight][0]++;
- }
- CMDMessageToMoB(playerid, const cmd[])
- {
- new string[128];
- GetPlayerName(playerid, string, sizeof(string));
- format(string,sizeof(string),"[MoB - %s] '%s' (Level: %d) | Command: %s",MoBRanks[PlayerInfo[playerid][MoB]][0][0], string, PlayerInfo[playerid][MoB], cmd);
- MessageToMoB(blue, string);
- }
- MessageToMoB(const color, const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][MoB])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement