Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Scripted by High Killa
- Please do NOT remove the credits, i've spend time on this.
- ##########################################################
- Script version: 1.0
- */
- #include <a_samp>
- #include <sscanf2>
- #include <SII>
- #include <zcmd>
- #include <foreach>
- #include <streamer>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" HK's Admin System");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- new PlayerText:welcomeText[MAX_PLAYERS];
- // Some enums to get defined.
- enum PlayerInfo
- {
- Logged,
- miniadmin,
- Level,
- Duty,
- Cash,
- pGD,
- pTS,
- pVip,
- pCop,
- pAmmo,
- pGuns,
- Banned,
- }
- new PInfo[MAX_PLAYERS][PlayerInfo];
- /////////// -- COLORS //////////
- forward MoneyTimer(playerid, amount);
- // Colors
- #define COLOR_RED 0xFF0000FF
- #define COLOR_GREEN 0x008040FF
- ///////////////////////////////////////////////////////////
- public OnPlayerDisconnect(playerid, reason)
- {
- PInfo[playerid][Logged] = 0;
- new pname[MAX_PLAYER_NAME], string[120 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), "† %s has left The Streetz of Los Santos ( Leaving )", pname);
- }
- SendClientMessageToAll(0x3FA63CFF, string);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(PInfo[playerid][Logged] == 0) // your variable for logged players if(PInfo[playerid][Logged] == 1)
- {
- SendClientMessage(playerid,0x3FA63CFF,"†. Sorry homie, but you're not logged in, so you can't spawn.");
- return 0;
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- // First, create the textdraw
- // Now show it
- PlayerTextDrawShow(playerid, welcomeText[playerid]);
- /// Adding an feature which got deleted on SOLS, you can just disable it here if you wish.
- new pname[MAX_PLAYER_NAME], string[120 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "† %s has joined the Server( Joining )", pname);
- SendClientMessageToAll(0x3FA63CFF, string);
- ///
- new file[64],PlayerName[25];//Creating a variable where we can store the file path, and the variable to store the player's name.
- GetPlayerName(playerid,PlayerName,sizeof PlayerName);//Storing the players name in the PlayerName variable.
- format(file,sizeof file,"Admin/%s.ini",PlayerName);//Storing the file path with the players name.
- if(!fexist(file))//Checking if the file exists
- {//Here goes the stuff you want to do if the user is not registered.
- SendClientMessage(playerid,-1,"SERVER: You're not registered, use /register [password] for begin playing.");
- }
- else
- {//Here goes the stuff you want to do if the user is registered.
- SendClientMessage(playerid,-4,"SERVER: Welcome back! Use /login [password] to access your account.");
- }
- return 1;
- }
- CMD:login(playerid, params[])
- {
- if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,COLOR_RED,"†. You are already logged in!");//Checking if the player is logged in, if he is, it won't allow him to login
- new password[23],password2[23];//Creating a variable to store the password, and another one to store the password from the user's file.
- if(sscanf(params,"s[23]",password)) return SendClientMessage(playerid,COLOR_RED,"†. USAGE: /login [password]");//Here we're checking if the player inputs any password, if not, it will return to him a message saying the proper usage.
- new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
- GetPlayerName(playerid,PlayerName,sizeof PlayerName);
- format(file,sizeof file,"Admin/%s.ini",PlayerName);
- if(!fexist(file)) return SendClientMessage(playerid,COLOR_RED,"†. Please use /register");//Checking if the player is not registered, again....
- INI_Open(file);//Opening the file with SII include
- INI_ReadString(password2,"Password");
- if(strcmp(password,password2) != 0) return SendClientMessage(playerid,COLOR_RED,"†. Wrong password!"),INI_Close();//Checking if he inputted the correct password, if not, retrieve him a message and closing the file;
- PInfo[playerid][Level] = INI_ReadInt("Level");
- PInfo[playerid][Cash] = INI_ReadInt("Cash");
- PInfo[playerid][pVip] = INI_ReadInt("pVip");
- PInfo[playerid][pGD] = INI_ReadInt("pGD");
- PInfo[playerid][pTS] = INI_ReadInt("pTS");//Setting the admin level variable, to the one thats in his file.
- INI_Close();//"Closing the file", that means that we're not using it anymore :P
- SendClientMessage(playerid,COLOR_GREEN,"†. You've been succesfully logged in. †");
- PInfo[playerid][Logged] = 1;//Setting the logged in variable to 1
- return 1;
- }
- CMD:register(playerid, params[])
- {
- if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,COLOR_RED,"†. You are already logged in!");//Checking if the player is logged in, if he is, it won't allow him to re-register
- new password[23];//Creating a variable to store the password
- if(sscanf(params,"s[23]",password)) return SendClientMessage(playerid,COLOR_RED,"†. USAGE: /register [password]");//Here we're checking if the player inputs any password, if not, it will return to him a message saying the proper usage.
- new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
- GetPlayerName(playerid,PlayerName,sizeof PlayerName);
- format(file,sizeof file,"Admin/%s.ini",PlayerName);
- if(fexist(file)) return SendClientMessage(playerid,COLOR_RED,"†. Somehow you're already registered!");//Checking if the player is already registered, again....
- INI_Open(file);//Opening the file with SII include (with this function, if the file is not created, it will automatically create the file.)
- INI_WriteString("Password",password);//Writing in the file the password the player has inputted.
- INI_WriteInt("Level",PInfo[playerid][Level]);
- INI_WriteInt("Cash",PInfo[playerid][Cash]);
- INI_WriteInt("pGD",PInfo[playerid][pGD]);
- INI_WriteInt("pTS",PInfo[playerid][pTS]);
- INI_WriteInt("pVip",PInfo[playerid][pVip]);//Writing in the file, the variable of the admin level.
- INI_Save();//After we write something to the file, we already have to use this to save the information in the player's file.
- INI_Close();//"Closing the file", that means that we're not using it anymore :P
- SendClientMessage(playerid,COLOR_GREEN,"†. You have successfully registered.");
- PInfo[playerid][Logged] = 1;//Setting the logged in variable to 1
- return 1;
- }
- CMD:duty(playerid, params[])
- {
- if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,COLOR_RED,"You are not admin level 1.");
- SendClientMessage(playerid, COLOR_GREEN, "SERVER: You're now on AdminDuty. /ahelp");
- PInfo[playerid][Duty] = 1;
- return 1;
- }
- CMD:dutyoff(playerid, params[])
- {
- if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,COLOR_RED,"You are not admin level 1.");
- SendClientMessage(playerid, COLOR_RED, "SERVER: You're now off AdminDuty, feel free to RP.");
- PInfo[playerid][Duty] = 0;
- return 1;
- }
- CMD:makeadmin(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"You're not an RCON admin.");//Checking if the player is rcon admin to set an admin level
- new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level.
- if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /setlevel <id> <level>");//Check if the player inputted a username or id and a admin level.
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not.
- new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
- GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name,
- format(file,sizeof file,"Admin/%s.ini",PlayerName);
- if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered
- INI_Open(file);//Opening the file with SII include
- INI_WriteInt("Level",level);//Writing the line "Level" the selected admin level.
- INI_Save();//Saving the file
- INI_Close();//Closing the file
- PInfo[id][Level] = level;
- SendClientMessage(playerid,-1,"You have changed the selected user's admin level");
- SendClientMessage(id,COLOR_GREEN,"You've been made an Admin, use /ac to chat with other admins.");
- return 1;
- }
- CMD:makevip(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"You're not an RCON admin.");//Checking if the player is rcon admin to set an admin level
- new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level.
- if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /makevip <id> <level>");//Check if the player inputted a username or id and a admin level.
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not.
- new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
- GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name,
- format(file,sizeof file,"Admin/%s.ini",PlayerName);
- if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered
- INI_Open(file);//Opening the file with SII include
- INI_WriteInt("pVip",level);//Writing the line "Level" the selected admin level.
- INI_Save();//Saving the file
- INI_Close();//Closing the file
- PInfo[id][pVip] = level;
- SendClientMessage(playerid,-1,"You have changed the selected user's VIP level");
- SendClientMessage(id,COLOR_GREEN,"You've been made an VIP, use /vc to chat with other VIP's.");
- return 1;
- }
- CMD:makeminiadmin(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"nigga who you think you are?");//Checking if the player is rcon admin to set an admin level
- new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level.
- if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /setlevel <id> <level>");//Check if the player inputted a username or id and a admin level.
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not.
- new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
- GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name,
- format(file,sizeof file,"Admin/%s.ini",PlayerName);
- if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered
- INI_Open(file);//Opening the file with SII include
- INI_WriteInt("miniadmin",level);//Writing the line "Level" the selected admin level.
- INI_Save();//Saving the file
- INI_Close();//Closing the file
- PInfo[id][miniadmin] = level;
- SendClientMessage(playerid,-1,"You have changed the selected user's miniadmin level");
- SendClientMessage(id,COLOR_GREEN,"You've been made an Mini-Admin, use /ac to chat with other admins.");
- return 1;
- }
- CMD:a(playerid, params[])
- {
- if(PInfo[playerid][Level] == 1)
- {
- new text[124], string[124], pname[MAX_PLAYER_NAME];
- if(sscanf(params, "s[124]", text)) return SendClientMessage(playerid, -1, "/a [text]");
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string),"[%s] %s: %s",aLevel(playerid), pname, text);
- SendAdminMessage(-1, string);
- }
- return 1;
- }
- CMD:vc(playerid, params[])
- {
- if(PInfo[playerid][pVip] >= 1) return SendClientMessage(playerid,COLOR_RED,"You are not an VIP level 1.");
- new string[128];
- if(sscanf(params, "s[80]", params)) return SendClientMessage(playerid, -1, "USAGE: /vc [text]");
- if(!PInfo[playerid][Level]) return SendClientMessage(playerid, COLOR_RED, "VIP's only!");
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- format(string,sizeof(string), "%s %s: %s",aLevel(playerid), name,params);
- foreach(Player, i)
- {
- if(PInfo[i][pVip])
- {
- SendClientMessage(i, 0xFF8000FF, string);
- }
- }
- return 1;
- }
- CMD:ac(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 1) return SendClientMessage(playerid,COLOR_RED,"You are not admin level 1.");
- new string[128];
- if(sscanf(params, "s[80]", params)) return SendClientMessage(playerid, -1, "USAGE: /ac [text]");
- if(!PInfo[playerid][Level]) return SendClientMessage(playerid, COLOR_RED, "Admins only!");
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- format(string,sizeof(string), "%s %s: %s",aLevel(playerid), name,params);
- foreach(Player, i)
- {
- if(PInfo[i][Level])
- {
- SendClientMessage(i, 0xFF8000FF, string);
- }
- }
- return 1;
- }
- CMD:admins(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid,0xC0C0C0FF,"Admins Online:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new duty = PInfo[i][Duty];
- new string[128];
- if(PInfo[i][Level] >= 1)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(i,name,sizeof(name));
- if(duty == 0)
- {
- format(string,sizeof(string),"%s | %s (ID: %d) Adminduty: No",aLevel(playerid),name,i);
- SendClientMessage(playerid,0xC0C0C0FF,string);
- }
- if(duty == 1)
- {
- format(string,sizeof(string),"%s | %s (ID: %d) Adminduty: Yes",aLevel(playerid),name,i);
- SendClientMessage(playerid,0x28BA18FF,string);
- }
- }
- }
- }
- }
- return 1;
- }
- /// NEW ADMIN CMDS ///
- CMD:kick(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 1) {
- new PID; //define the playerid we wanna kick
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- format(str, sizeof(str), "%s has been kicked by %s %s [reason: %s] ", Playername, aLevel(playerid), Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- Kick(PID); //kick the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 1."); //return this message
- }
- return 1;
- }
- CMD:slap(playerid,params[])
- {
- if(PInfo[playerid][Level] >= 2) {
- new OtherPlayer, Msg[128], Name[24], Message[128], OtherPlayerName[24], Float:x, Float:y, Float:z;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!");
- else if(sscanf(params, "rs[128]", OtherPlayer, Message)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /slap [playerid] [reason]");
- GetPlayerName(playerid, Name, sizeof(Name));
- GetPlayerName(OtherPlayer, OtherPlayerName, sizeof(OtherPlayerName));
- format(Msg, sizeof(Msg), "%s has been slapped by %s %s [Reason: %s]", Name, aLevel(playerid), OtherPlayerName, Message);
- SendClientMessageToAll(COLOR_RED, Msg);
- GetPlayerPos(OtherPlayer, x, y, z);
- SetPlayerPos(OtherPlayer, x, y, z+5);
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 2."); //return this message
- }
- return 1;
- }
- CMD:bitchslap(playerid,params[])
- {
- if(PInfo[playerid][Level] >= 11) {
- new OtherPlayer, Msg[128], Name[24], Message[128], OtherPlayerName[24], Float:x, Float:y, Float:z;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!");
- else if(sscanf(params, "rs[128]", OtherPlayer, Message)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /bitchslap [playerid] [reason]");
- GetPlayerName(playerid, Name, sizeof(Name));
- GetPlayerName(OtherPlayer, OtherPlayerName, sizeof(OtherPlayerName));
- format(Msg, sizeof(Msg), "%s has been bitch slapped by %s %s [Reason: %s]", Name, aLevel(playerid), OtherPlayerName, Message);
- SendClientMessageToAll(COLOR_RED, Msg);
- GetPlayerPos(OtherPlayer, x, y, z);
- SetPlayerPos(OtherPlayer, x, y, z+30);
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 11."); //return this message
- }
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 11) {
- new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id, skinid, string[128];
- if(!IsPlayerAdmin(playerid)) return 0;
- if(sscanf(params, "ui", id, skinid)) return SendClientMessage(playerid, -1, "USAGE: /setskin [playerid] [skinid]");
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- GetPlayerName(id, targetname, MAX_PLAYER_NAME);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected!");
- SetPlayerSkin(id, skinid);
- format(string, 128, "Admin %s(%d) has set your skinid to %i", name, playerid, skinid);
- SendClientMessage(id, -1, string);
- format(string, 128, "You set %s(%d) skin to skinid %i", targetname, id, skinid);
- SendClientMessage(playerid, -1, string);
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 11."); //return this message
- }
- return 1;
- }
- CMD:warn(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 1) {
- {
- new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[128],id,reason[64];
- if(sscanf(params,"uds[64]",id,reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /warn [playerid] [reason]");
- GetPlayerName(id,name, sizeof(name));
- GetPlayerName(id,name2, sizeof(name2));
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "SERVER: User is not connected.");
- format(string, sizeof(string), "%s has been warned by %s %s [Reason: %s]",name2, aLevel(playerid), name, reason);
- SendClientMessageToAll(COLOR_RED,string);
- SendClientMessage(id, COLOR_RED, "SERVER: You warned by %s, keep on your thing and you'll be punished harder.", name);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 1.");
- }
- return 1;
- }
- CMD:ajail(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 5) {
- {
- new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[128],id,reason[64],time;
- if(sscanf(params,"uds[64]",id,time,reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /ajail [playerid] [minutes] [reason]");
- GetPlayerName(playerid,name, sizeof(name));
- GetPlayerName(id,name2, sizeof(name2));
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED,"CMD: Invalid playerid.");
- format(string, sizeof(string), "%s has been ajailed by %s %s for %d minutes [Reason: %s]", name2, aLevel(playerid), name,time,reason);
- SendClientMessageToAll(COLOR_RED,string);
- SetPlayerPos(id,198.5924,161.7369,1003.0300,182.9884);
- } // Administrator Noles2197 admin jailed Noles2197 minutes for 60 dm."
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 5."); //return this message
- }
- return 1;
- }
- CMD:setcash(playerid, params[])
- {
- new pID, cash;
- if(PInfo[playerid][Level] >= 7) {
- {
- if(sscanf(params, "ud", pID, cash)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setcash [playerid] [amount of money]");
- if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
- ResetPlayerMoney(pID);
- return GivePlayerMoney(pID,cash);
- }
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 7."); //return this message
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(PInfo[playerid][Level] >= 4) {
- new PID; //define the playerid we wanna ban
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- format(str, sizeof(str), "%s has been banned by %s %s [reason: %s] ", Playername, aLevel(playerid), Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- Ban(PID); //Ban the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_RED, "You are not admin level 4."); //return this message
- }
- return 1;
- }
- /// END OF NEW ADMIN CMDS ///
- //// STOCKS AND STRINGS /////
- SendAdminMessage(color, const string[])
- {
- new playerid;
- foreach(Player, i)
- {
- if(PInfo[playerid][Level])
- {
- SendClientMessage(i, color, string);
- }
- }
- return 1;
- }
- stock aLevel(playerid)
- {
- new svString[120];
- switch (PInfo[playerid][Level])
- {
- case 1: svString = "Trial Admin";
- case 2: svString = "Junior Admin";
- case 3: svString = "Low Admin";
- case 4: svString = "Admin";
- case 5: svString = "High Admin";
- case 6: svString = "Experienced Admin";
- case 7: svString = "Senior Admin";
- case 8: svString = "Top Admin";
- case 9: svString = "Lead Admin";
- case 10: svString = "Head Admin";
- case 11: svString = "Server Owner";
- }
- return svString;
- }
- stock vLevel(playerid)
- {
- new svString[120];
- switch (PInfo[playerid][pVip])
- {
- case 1: svString = "Bronze VIP";
- case 2: svString = "Silver VIP";
- case 3: svString = "Gold VIP";
- }
- return svString;
- }
- stock mLevel(playerid)
- {
- new svString[120];
- switch (PInfo[playerid][miniadmin])
- {
- case 1: svString = "Mini Admin";
- case 2: svString = "Low Mini Admin";
- case 3: svString = "Head Mini Admin";
- }
- return svString;
- }
- stock SendToAdmins(COLOR,message[])
- {
- new string[128];
- for(new i = 0; < MAX_PLAYERS; i++)
- if(PInfo[i][Level] > 1)
- {
- SendClientMessage(i,COLOR,message);
- }
- return 0;
- }
- public OnPlayerUpdate(playerid)
- {
- SetPlayerScore(playerid, GetPlayerMoney(playerid));
- return 1;
- }
- ///
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement