Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Filterscript Admin System
- /makeadmin
- By Shomy
- NAPOMENA: Ovaj Admin System koristi File "Korisnici". Dodajte folder "Korisnici"
- U Vasem scriptfiles folderu !
- Ako vec imate File slican "Korisnici" a drugacije ime, promenite na liniji 20
- Umesto "/Korisnici/%s.ini" stavite "/(Ime Vaseg File)/%s.ini" !
- */
- //==== [ INCLUDE ] ====//
- #include < a_samp >
- #include < zcmd >
- #include < sscanf2 >
- #include < YSI\y_ini >
- #include < foreach >
- //==== [ DEFINE ] ====//
- #define PATH "/Korisnici/%s.ini"
- #define GRESKA(%0,%1) \
- SendClientMessageEx(%0, -1, "{FF8000}[GRESKA] {FFFFFF} "%1)
- //==== [ SKRACENICE ] ====//
- #define SCM SendClientMessage
- #define SCMTA SendClientMessageToAll
- #define SPD ShowPlayerDialog
- #define DSM DIALOG_STYLE_MSGBOX
- #define DSL DIALOG_STYLE_LIST
- #define DSI DIALOG_STYLE_INPUT
- //==== [ BOJE ] ====//
- #define COL_SERVER "{FF8000}"
- #define BELA "{FFFFFF}"
- //==== [ DIALOZI ] ====//
- #define DIALOG_BANSEBE 1
- #define DIALOG_BANNED 2
- #define DIALOG_DAJSVIMA 3
- #define DIALOG_MONEYUP 4
- #define DIALOG_AHELP 5
- #define DIALOG_APORT 6
- //==== [ Enum ] ====//
- enum pInfo
- {
- pAdminLevel,
- pBanovan,
- pAdminDuty,
- pMutiran
- }
- //==== [ NEW ] ====//
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new String[128], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
- new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
- new Muted[MAX_PLAYERS];
- //==== [ PUBLICS ] ====//
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
- return 1;
- }
- public OnPlayerText(playerid,text[])
- {
- if(PlayerInfo[playerid][pMutiran] == 1)
- {
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Ne mozete da pricate, mutirani ste.");
- return 0;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(IsSpecing[playerid] == 1)
- {
- SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
- SetPlayerInterior(playerid,Inter[playerid]);
- SetPlayerVirtualWorld(playerid,vWorld[playerid]);
- IsSpecing[playerid] = 0;
- IsBeingSpeced[spectatorid[playerid]] = 0;
- SetPlayerSkin(playerid, 80);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(PlayerInfo[playerid][pBanovan] == 1)
- {
- SPD(playerid, DIALOG_BANNED, DSM, ""COL_SERVER"BAN",""BELA"Banovani ste sa servera !\nUkoliko mislite da je greska,\nPrijavite na forum www.VasForum.com\nInformacije o banu na forumu !",""BELA"U redu","");
- SetTimerEx( "TKick", 500, false, "i", playerid );
- }
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- PlayerInfo[playerid][pAdminDuty] = 0;
- SacuvajIgraca(playerid);
- IsSpecing[playerid] = 0;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_BANSEBE)
- {
- if(response)
- {
- PlayerInfo[playerid][pBanovan] = 1;
- SacuvajIgraca(playerid);
- new h,m,s,g,me,d,msg[80];
- gettime(h,m,s);
- getdate(g,me,d);
- format(msg,sizeof(msg), ""COL_SERVER"[INFO] "BELA"Datum bana %d.%d.%d. Vreme bana %d:%d:%d. Forum: www.VasForum.com",d,me,g,h,m,s);
- SCM(playerid, -1, ""COL_SERVER"[INFO] "BELA"Banovali ste samog sebe, ukoliko hocete unban slikajte ovo !");
- SCM(playerid, -1, msg);
- SetTimerEx( "TKick", 500, false, "i", playerid );
- }
- }
- if(dialogid == DIALOG_DAJSVIMA)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
- }
- case 1:
- {
- GRESKA(playerid, "Trenutno mozete samo nagraditi igrace Money Upom !");
- }
- case 2:
- {
- GRESKA(playerid, "Trenutno mozete samo nagraditi igrace Money Upom !");
- }
- }
- }
- }
- if(dialogid == DIALOG_MONEYUP)
- {
- new pare;
- if(sscanf(inputtext, "d", pare)) return SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
- if(pare < 2000 || pare > 20000)
- {
- SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
- GRESKA(playerid, "Kolicina novca ne moze biti veca od 20000$ ili manja od 2000$ !");
- }
- else
- {
- foreach(Player, i)
- {
- new msg[80];
- format(msg,sizeof(msg), ""COL_SERVER"[INFO] "BELA"Admin %s je nagradio sve igrace sa %d$ !", GetName(playerid), pare);
- SCMTA(-1, msg);
- GivePlayerMoney(i, pare);
- }
- }
- }
- if(dialogid == DIALOG_APORT)
- {
- if(!response) return 0;
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1480.9747,-1743.3533,13.5469);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Opstine !");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1480.9747,-1743.3533,13.5469);
- SetPlayerPos(playerid, 1480.9747,-1743.3533,13.5469);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Opstine !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 1:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1461.5502,-1024.9500,23.8281);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Banke ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1461.5502,-1024.9500,23.8281);
- SetPlayerPos(playerid, 1461.5502,-1024.9500,23.8281);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Banke !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 2:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1222.1575,-924.5607,42.8987);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Burga ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1222.1575,-924.5607,42.8987);
- SetPlayerPos(playerid, 1222.1575,-924.5607,42.8987);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Burga !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 3:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1420.7911,-1178.8344,25.9922);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Zlatare ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1420.7911,-1178.8344,25.9922);
- SetPlayerPos(playerid, 1420.7911,-1178.8344,25.9922);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Zlatare !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 4:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1310.0541,-1368.5321,13.5502);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Biroa ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1310.0541,-1368.5321,13.5502);
- SetPlayerPos(playerid, 1310.0541,-1368.5321,13.5502);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Biroa !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 5:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1178.5061,-1323.2313,14.1234);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Bolnice ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1178.5061,-1323.2313,14.1234);
- SetPlayerPos(playerid, 1178.5061,-1323.2313,14.1234);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Bolnice !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 6:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1545.6926,-1675.7408,13.5609);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Policije ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1545.6926,-1675.7408,13.5609);
- SetPlayerPos(playerid, 1545.6926,-1675.7408,13.5609);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Policije !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 7:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, -1414.8940,-303.7203,13.9926);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do SF ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, -1414.8940,-303.7203,13.9926);
- SetPlayerPos(playerid, -1414.8940,-303.7203,13.9926);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do SF !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- case 8:
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid, 1693.4326,1448.2053,10.7641);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do LV ! ");
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv, 1693.4326,1448.2053,10.7641);
- SetPlayerPos(playerid, 1693.4326,1448.2053,10.7641);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do LV !");
- PutPlayerInVehicle(playerid, idv, 0);
- SetPlayerInterior(playerid, 0);
- }
- }
- }
- }
- }
- return 1;
- }
- //==== [ STOCK ] ====//
- stock SendClientMessageEx(playerid, color, const str[], {Float,_}:...) {
- static
- args,
- start,
- end,
- string[144]
- ;
- #emit LOAD.S.pri 8
- #emit STOR.pri args
- if(args > 12)
- {
- #emit ADDR.pri str
- #emit STOR.pri start
- for (end = start + (args - 12); end > start; end -= 4)
- {
- #emit LREF.pri end
- #emit PUSH.pri
- }
- #emit PUSH.S str
- #emit PUSH.C 144
- #emit PUSH.C string
- #emit PUSH.C args
- #emit SYSREQ.C format
- SendClientMessage(playerid, color, string);
- #emit LCTRL 5
- #emit SCTRL 4
- #emit RETN
- }
- return SendClientMessage(playerid, color, str);
- }
- stock Ovlasceni(playerid)
- {
- SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Niste ovlasceni !");
- return 1;
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock SacuvajIgraca(playerid)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
- INI_WriteInt(File,"Banovan",PlayerInfo[playerid][pBanovan]);
- INI_WriteInt(File,"Mutiran",PlayerInfo[playerid][pMutiran]);
- INI_Close(File);
- }
- stock ClearChatToAll()
- {
- for (new c = 0; c < 150; c++)
- {
- SendClientMessageToAll(-1, " ");
- }
- }
- //==== [ CMD ] ====//
- CMD:makeadmin( playerid, params[] )
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 6)
- {
- new id, msg1[128], msg2[128], alevel, msg[128], msg0[128];
- if(sscanf(params, "ud", id, alevel)) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Korisite /makeadmin [ID] [Level 1-7]");
- if(alevel > 7) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Admin level ne moze biti veci od 7 !");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Taj igrac nije na serveru !");
- if(alevel == 0)
- {
- if(PlayerInfo[id][pAdminLevel] > 0)
- {
- format(msg,sizeof(msg), "{FF8000}[SERVER] {FFFFFF}Admin %s Vam je skinuo Admina.", GetName(playerid));
- SendClientMessage(id, -1, msg);
- format(msg0,sizeof(msg0), "{FF8000}[SERVER] {FFFFFF}Skinuli ste igracu %s Admina.", GetName(id));
- SendClientMessage(playerid, -1, msg0);
- PlayerInfo[id][pAdminLevel] = 0;
- }
- else return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Taj igrac nema Admina ! ");
- }
- else
- {
- format(msg1,sizeof(msg1), "{FF8000}[SERVER] {FFFFFF}Admin %s Vam je dao Admin Level %d.", GetName(playerid), alevel);
- SendClientMessage(id, -1, msg1);
- format(msg2,sizeof(msg2), "{FF8000}[SERVER] {FFFFFF}Dali ste igracu %s Admin Level %d.", GetName(id), alevel);
- SendClientMessage(playerid, -1, msg2);
- PlayerInfo[id][pAdminLevel] = alevel;
- }
- }
- else return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Niste ovlasceni !");
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- new id, reason[80], msg[128], msg1[90];
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(sscanf(params, "us[80]", id, reason)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /ban [ID] [Razlog] !");
- if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
- if(id == playerid) return SPD(playerid, DIALOG_BANSEBE, DSM, ""COL_SERVER"BAN",""BELA"Da li ste sigurni da zelite banovati sebe ?",""BELA"DA",""BELA"NE");
- if(PlayerInfo[id][pAdminLevel] == 7 && PlayerInfo[playerid][pAdminLevel] < 7)
- {
- new str[128];
- format(str,sizeof(str), ""COL_SERVER"[UPOZORENJE] "BELA"Admin %s je pokusao da vas banuje !", GetName(playerid));
- SCM(id, -1, str);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Da banujes vlasnika? Prijavljen si !");
- }
- if(PlayerInfo[id][pBanovan] == 0)
- {
- new h,m,s;
- PlayerInfo[id][pBanovan] = 1;
- SacuvajIgraca(playerid);
- format(msg,sizeof(msg), ""COL_SERVER"[BAN] "BELA"Igrac %s je banovan od strane admina %s. Razlog %s.", GetName(playerid), reason);
- SCMTA(-1, msg);
- gettime(h,m,s);
- format(msg1,sizeof(msg1), ""COL_SERVER"[INFO] "BELA"Vreme bana %d:%d:%d. Zalbe na forum www.VasForum.com !",h,m,s);
- SCM(id, -1, msg1);
- SetTimerEx( "TKick", 500, false, "i", id );
- }
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- new id, razlog[80], msg[128], msg1[128];
- if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Koristite /kick [ID] [Razlog] !");
- if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
- if(PlayerInfo[id][pAdminLevel] == 7 && PlayerInfo[playerid][pAdminLevel] < 7)
- {
- new str[128];
- format(str,sizeof(str), ""COL_SERVER"[UPOZORENJE] "BELA"Admin %s je pokusao da vas kickuje !", GetName(playerid));
- SCM(id, -1, str);
- SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Da kickujes vlasnika? Prijavljen si !");
- }
- else
- {
- new h,m,s;
- format(msg,sizeof(msg), ""COL_SERVER"[KICK] "BELA"Igrac %s je kickovan od strane admina %s. Razlog %s.", GetName(playerid), razlog);
- SCMTA(-1, msg);
- gettime(h,m,s);
- format(msg1,sizeof(msg1), ""COL_SERVER"[INFO] "BELA"Vreme kicka %d:%d:%d. Zalbe na forum www.VasForum.com !",h,m,s);
- SCM(id, -1, msg1);
- SetTimerEx( "TKick", 500, false, "i", id );
- }
- }
- else return Ovlasceni(playerid);
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- new id, razlog[80], msg[128], msg1[128];
- if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Koristite /slap [ID] [Razlog] !");
- if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Taj igrac nije na serveru !");
- else
- {
- new Float:X,Float:Y,Float:Z,Float:A;
- GetPlayerPos(id, X,Y,Z);
- GetPlayerFacingAngle(id, A);
- SetPlayerPos(id, X,Y,Z+5);
- SetPlayerFacingAngle(id, A);
- format(msg,sizeof(msg), ""COL_SERVER"Admin %s Vas je osamario. Razlog %s.",GetName(playerid), razlog);
- SCM(id, -1, msg);
- format(msg1,sizeof(msg1), ""COL_SERVER"Osamarili ste igraca %s. Razlog %s.",GetName(id), razlog);
- SCM(playerid, -1, msg1);
- }
- }
- else return Ovlasceni(playerid);
- return 1;
- }
- CMD:dajsvima(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 5)
- {
- SPD(playerid, DIALOG_DAJSVIMA, DSL, ""COL_SERVER"Nagrade",""BELA"Money Up\nLevel Up\nRespekti",""BELA"Izaberi",""BELA"Odustani");
- }
- else return Ovlasceni(playerid);
- return 1;
- }
- CMD:cc(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- ClearChatToAll();
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- SCM(i, -1, ""COL_SERVER"====[ "BELA"Chat Ociscen "COL_SERVER"]====");
- }
- }
- return 1;
- }
- CMD:ah(playerid, params[],help)
- {
- new info[2080];
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdminLevel] >= 1)
- {
- strcat(info, ""COL_SERVER"||===============================================[ "BELA"Admin Help "COL_SERVER"]=============================================||\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 1)
- {
- strcat(info, ""COL_SERVER"Admin Level 1 | "BELA"/specon /specoff /count /aduty /apopravi /cc /kick /goto /slap /freeze /unfreeze /rtc /mlista /ajail\n", sizeof(info));
- strcat(info, ""COL_SERVER"Admin Level 1 | "BELA"/port /jetpack /kill /avozilo /gethere /sethp /setarmor /vfix /a (admin chat) /ao (ooc) /uzmiip /nitro /ban /odg /zatvoreni\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 2)
- {
- strcat(info, ""COL_SERVER"Admin Level 2 | "BELA"/vhelti /tod /podesivreme /mute /proveri /warn /offban /rtc /veh\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 3)
- {
- strcat(info, ""COL_SERVER"Admin Level 3 | "BELA"/gotopos /unmute /bojavozila /skiniwarn /gotokuca /gotostan /gotovikendica /gotofirma\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 4)
- {
- strcat(info, ""COL_SERVER"Admin Level 4 | "BELA"/setskin /fban /unban /agorivo /aocistiwl\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 5)
- {
- strcat(info, ""COL_SERVER"Glavni Admin | "BELA"/jetpack /agl /aoruzije /svimaheal /svimapancir /sacuvajacounte /oslobodi /hdajnovac\n\n", sizeof(info));
- strcat(info, ""COL_SERVER"Glavni Admin | "BELA"/hpostavilidera /hpostavisupp\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 6)
- {
- strcat(info, ""COL_SERVER"Direktor | "BELA"/makeadmin /makehelper /dajsvima /podesinovac /ubisve /kreirajfirmu /kreirajkucu\n", sizeof(info));
- strcat(info, ""COL_SERVER"Direktor | "BELA"/efirmu /efirmu2 /podesistats /postavilidera /spodesavanja /aprodajkucu /ekucu /estan\n", sizeof(info));
- strcat(info, ""COL_SERVER"Direktor | "BELA"/kreirajstan /aprodajstan /kreirajvikendicu /evikendicu /aprodajvikendicu /av(prodaj,parkiraj)\n", sizeof(info));
- strcat(info, ""COL_SERVER"Direktor | "BELA"/am(prodaj,parkiraj) /ab(parkiraj) /ale(parkiraj,prodaj) /kreirajbankomat /ebankomat /portbankomat\n", sizeof(info));
- strcat(info, ""COL_SERVER"Direktor | "BELA"/apl(prodaj,parkiraj) /rac /nagrade\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 7)
- {
- strcat(info, ""COL_SERVER"Vlasnik| "BELA"** /server /spodesavanja **\n\n", sizeof(info));
- }
- if (PlayerInfo[playerid][pAdminLevel] >= 1)
- {
- strcat(info, ""COL_SERVER"||========================================================================================================||\n\n", sizeof(info));
- }
- SPD(playerid, DIALOG_AHELP, DSM, ""COL_SERVER"Admin Help", info, "U redu", "");
- }
- return 1;
- }
- CMD:spec(playerid, params[]) // SPEC i SPECOFF UZETI IZ DRUGOG MODA - MRZELO ME RADITI
- {
- new id;
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(sscanf(params,"u", id))return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristi: /spec [id]");
- if(id == playerid) return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Ne mozes da nadgledas samog sebe !");
- if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
- if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Vec nadgledas nekoga !");
- GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
- Inter[playerid] = GetPlayerInterior(playerid);
- vWorld[playerid] = GetPlayerVirtualWorld(playerid);
- TogglePlayerSpectating(playerid, true);
- if(IsPlayerInAnyVehicle(id))
- {
- if(GetPlayerInterior(id) > 0)
- {
- SetPlayerInterior(playerid,GetPlayerInterior(id));
- }
- if(GetPlayerVirtualWorld(id) > 0)
- {
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
- PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
- }
- }
- else
- {
- if(GetPlayerInterior(id) > 0)
- {
- SetPlayerInterior(playerid,GetPlayerInterior(id));
- }
- if(GetPlayerVirtualWorld(id) > 0)
- {
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
- }
- PlayerSpectatePlayer(playerid,id);
- }
- GetPlayerName(id, Name, sizeof(Name));
- format(String, sizeof(String),""COL_SERVER"[SERVER] "BELA"Poceo si sa nagledanjem igraca %s",Name);
- SendClientMessage(playerid,0x0080C0FF,String);
- IsSpecing[playerid] = 1;
- IsBeingSpeced[id] = 1;
- spectatorid[playerid] = id;
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Nisi ovlasceni !");
- return 1;
- }
- CMD:specoff(playerid,params[]) // SPEC i SPECOFF UZETI IZ DRUGOG MODA - MRZELO ME RADITI
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(IsSpecing[playerid] == 0) return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Ne nadgledas nikoga !");
- TogglePlayerSpectating(playerid, 0);
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Nisi ovlasceni !");
- return 1;
- }
- CMD:aport(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- SPD(playerid,DIALOG_APORT, DSL, ""COL_SERVER"Teleport",""BELA"Opstina\nBanka\nBurg\nZlatara\nBiro\nBolnica\nPolicija\nSF\nLV","Odaberi","Izlaz");
- }
- return 1;
- }
- CMD:jetpack(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] < 1) return SCM(playerid,-1,""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
- if(PlayerInfo[playerid][pAdminDuty] == 0) return SCM(playerid,-1,""COL_SERVER"[SERVER] "BELA"Morate biti na admin duznosti!");
- SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Uzeli ste jetpack!");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- return 1;
- }
- CMD:aduty(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdminLevel] == 0) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste admin !");
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- new msgstring[150];
- if(PlayerInfo[playerid][pAdminDuty] == 0)
- {
- format(msgstring, sizeof(msgstring), ""COL_SERVER"(( "BELA"Admin "COL_SERVER"%s "BELA"je sada na duznosti. Za pomoc kucajte"COL_SERVER" /pitaj "BELA"! "COL_SERVER"))",GetName(playerid));
- SendClientMessageToAll(-1, msgstring);
- SetPVarInt(playerid, "LastSkin", GetPlayerSkin(playerid));
- SetPlayerSkin(playerid, 294);
- PlayerInfo[playerid][pAdminDuty] = 1;
- SetPlayerHealth(playerid, 9999);
- SetPlayerArmour(playerid, 9999);
- }
- else
- {
- format(msgstring, sizeof(msgstring), ""COL_SERVER"(( "BELA"Admin "COL_SERVER"%s "BELA"vise nije na duznosti. "COL_SERVER"))",GetName(playerid));
- SendClientMessageToAll(-1, msgstring);
- SetPlayerSkin(playerid, GetPVarInt(playerid, "LastSkin"));
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- PlayerInfo[playerid][pAdminDuty] = 0;
- }
- }
- }
- return 1;
- }
- CMD:apopravi(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste u vozilu !");
- if(IsPlayerInAnyVehicle(playerid))
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Popravili ste vozilo");
- new string[128];
- format(string,sizeof(string),""COL_SERVER"[ADMIN INFO] "BELA"Admin/Helper %s je popravio vozilo.", GetName(playerid));
- SendAHMessage(-1, string);
- }
- }
- return 1;
- }
- CMD:mute(playerid, params[])
- {
- new id;
- new time, minuti;
- time = gettime(minuti);
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(sscanf(params, "ud", id, time)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /mute [ID] [Vreme (Minuti)] !");
- if(time > 120 || time < 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Vreme ne moze biti vece od 120 minuta ( 2 sata ) ili manje od 1 minut !");
- if(PlayerInfo[id][pMutiran] == 0)
- {
- new string[80], msg1[80], AInfo[90];
- format(string,sizeof(string), ""COL_SERVER"[SERVER] "BELA"Admin %s vas je ucutkao na %d minuta", GetName(playerid), time);
- SCM(id, -1, string);
- format(msg1,sizeof(msg1), ""COL_SERVER"[SERVER] "BELA"Ucutkali ste igraca %s na %d minuta", GetName(id), time);
- SCM(playerid, -1, msg1);
- format(AInfo,sizeof(AInfo), ""COL_SERVER"[AInfo] "BELA"Admin %s je ucutkao igraca %s na %d minuta.", GetName(playerid), GetName(id), time);
- SendAHMessage(-1, AInfo);
- PlayerInfo[id][pMutiran] = 1;
- Muted[id] = SetTimerEx("MuteTimer",time*60000, false, "i", id);
- new INI:File = INI_Open(UserPath(playerid));
- INI_WriteInt(File,"Mutiran", 1);
- INI_Close(File);
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac je vec mutiran !");
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
- return 1;
- }
- CMD:unmute(playerid, params[])
- {
- new id;
- new msg1[80], msg2[80], AInfo[90];
- if(PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if(sscanf(params, "u", id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /unmute [ID] !");
- if(PlayerInfo[id][pMutiran] == 1)
- {
- PlayerInfo[id][pMutiran] = 0;
- format(msg1,sizeof(msg1), ""COL_SERVER"[SERVER] "BELA"Admin %s vas je unmute, sada mozete normalno pisati !", GetName(playerid));
- format(msg2,sizeof(msg2), ""COL_SERVER"[SERVER] "BELA"Unmute ste igraca %s !",GetName(id));
- format(AInfo,sizeof(AInfo), ""COL_SERVER"[AInfo] "BELA"Admin %s je unmute igraca %s !", GetName(playerid),GetName(id));
- SCM(id, -1, msg1);
- SCM(playerid, -1, msg2);
- SendAHMessage(-1, AInfo);
- KillTimer(Muted[id]);
- new INI:File = INI_Open(UserPath(playerid));
- INI_WriteInt(File,"Mutiran", 0);
- INI_Close(File);
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije mutiran !");
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
- return 1;
- }
- //==== [ TIMERI ] ====//
- forward TKick(playerid);
- public TKick(playerid)
- {
- Kick(playerid);
- return 1;
- }
- forward MuteTimer(playerid);
- public MuteTimer(playerid)
- {
- PlayerInfo[playerid][pMutiran] = 0;
- SacuvajIgraca(playerid);
- SCM(playerid, -1, ""COL_SERVER"[INFO] "BELA"Mute vreme je proslo, mozete ponovo pisati. ");
- return 1;
- }
- //==== [ AH MSG ] ====//
- forward SendAHMessage(color, string[]);
- public SendAHMessage(color, string[])
- {
- foreach(Player,i)
- {
- if(PlayerInfo[i][pAdminLevel] >= 1)
- {
- SCM(i, color, string);
- printf("%s", string);
- }
- }
- }
- //====================[ KRAJ FILTERSCRIPT ADMIN SYS BY SHOMY ]================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement