Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************
- m_Admin&Register System
- v1.0
- *****************************/
- #define FILTERSCRIPT
- #include <a_samp> /* Credits to SA-MP Team */
- #include <YSI\y_ini> /* Credits to Y_Less */
- #include <YSI\y_commands> /* Credits to Y_Less */
- #include <sscanf2> /* Credits to Y_Less */
- #include <rBits> /* Credits to RyDeR */
- #include <foreach> /* Credits to Y_Less */
- /*dialozi*/
- #define REG 1
- #define LOG 2
- #define ON_REG 4
- #define ON_LOG 5
- #define LOG_FAIL 6
- #define KOMANDE 7
- #define CHECK 8
- #define STATS 9
- #define PJESMAZAMENE 10
- #define PJESMAZASVE 11
- #define ADMKOMANDE 12
- #define GOTO 13
- /*admin leveli*/
- #define ADM_LVL_3 3
- #define GAMEMASTER 1
- #define ADM_LVL_2 2
- /*ostalo*/
- #define SCM(%0,%1,%2) SendClientMessage(%0,%1,%2)
- #define SCMTA(%1,%2) SendClientMessageToAll(%1,%2)
- enum info
- {
- Score,
- Novac,
- Lozinka,
- Admin,
- Warns,
- Skin,
- Zatvoren,
- Mutean
- };
- new Podatci[MAX_PLAYERS][info];
- new MutedVrijeme[MAX_PLAYERS],
- FreezeVrijeme[MAX_PLAYERS],
- JailedVrijeme[MAX_PLAYERS];
- new rBit1: Ulogiran <MAX_PLAYERS>;
- new rBit1: Freezed <MAX_PLAYERS>;
- new rBit1: togglepm <MAX_PLAYERS>;
- new rBit1: Specting <MAX_PLAYERS>;
- public OnPlayerConnect(playerid)
- {
- rBit1_Set(Ulogiran, playerid, 0);
- new stra[256],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(stra,sizeof(stra),"/mIgraci/%s.ini",name);
- if(!fexist(stra)) {
- ShowPlayerDialog(playerid,REG,DIALOG_STYLE_PASSWORD,"{00FFFF}[SERVER] Registracija","{FFFFFF}Upisite zeljenu lozinku da bi ste se registrirali!","Registriraj","Kick");
- }
- else {
- INI_ParseFile(stra, "Load_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid,LOG,DIALOG_STYLE_PASSWORD,"{00FFFF}[SERVER] Logiranje","{FFFFFF}Upisite vašu lozinku da bi ste se ulogirali!","Login","Kick");
- }
- return true;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetSpawnInfo(playerid, 0, Podatci[playerid][Skin], 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 ); // X= 1958.33 , Y = 13.43.12 , Z = 15.36 //
- SpawnPlayer(playerid);
- return true;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(rBit1_Get(Ulogiran, playerid))
- {
- new
- stra[256];
- format(stra,sizeof stra,"/mIgraci/%s.ini",GetName(playerid));
- new
- INI:dat = INI_Open(stra);
- INI_SetTag(dat,"data");
- INI_WriteInt(dat,"Novac",GetPlayerMoney(playerid));
- INI_WriteInt(dat,"Score",GetPlayerScore(playerid));
- INI_WriteInt(dat,"Admin",Podatci[playerid][Admin]);
- INI_WriteInt(dat,"Warns",Podatci[playerid][Warns]);
- INI_WriteInt(dat,"Skin",GetPlayerSkin(playerid));
- INI_WriteInt(dat,"Zatvoren",Podatci[playerid][Zatvoren]);
- INI_WriteInt(dat,"Mutean",Podatci[playerid][Mutean]);
- INI_Close(dat);
- }
- rBit1_Set(Ulogiran, playerid, 0);
- return true;
- }
- public OnPlayerText(playerid, text[])
- {
- if(Podatci[playerid][Mutean] == 1)
- {
- SCM(playerid, -1, "Nemožete pričati zato što ste ušutkani (muteani)!");
- return false;
- }
- return true;
- }
- public OnPlayerRequestSpawn(playerid) { if(!rBit1_Get(Ulogiran, playerid)) return SendClientMessage(playerid,-1,"[SERVER]: Ovaj server zahtjeva logiranje prije spawnanja! Automatski kick!"),Kick(playerid); return true; }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == REG)
- {
- if(!response) Kick(playerid);
- new stra[256];
- format(stra,sizeof(stra),"/mIgraci/%s.ini",GetName(playerid));
- new
- INI:dat = INI_Open(stra);
- INI_SetTag(dat,"data");
- INI_WriteInt(dat,"Lozinka",udb_hashe(inputtext));
- INI_WriteInt(dat,"Novac",1200);
- INI_WriteInt(dat,"Score",0);
- INI_WriteInt(dat,"Admin",0);
- INI_WriteInt(dat,"Warns",0);
- INI_WriteInt(dat,"Skin",random(299));
- INI_WriteInt(dat,"Zatvoren",0);
- INI_WriteInt(dat,"Mutean",0);
- INI_Close(dat);
- rBit1_Set(Ulogiran, playerid, 1);
- Podatci[playerid][Novac] = 1200;
- Podatci[playerid][Skin] = random(299);
- SetPlayerSkin(playerid,Podatci[playerid][Skin]);
- GivePlayerMoney(playerid,Podatci[playerid][Novac]);
- new str[256];
- format(str,sizeof(str),"\n{FFFFFF}Uspješno ste se registrirali na naš server!\n{FFFFFF}Nadamo se da će te uživati u igranju na našem serveru!\n{FFFFFF}Ovo su vaše informacije:\n\n{80FF00}Ime : {FFFFFF}%s\n{80FF00}Lozinka : {FFFFFF}%s\n{80FF00}Novac : {FFFFFF}%d",GetName(playerid),inputtext,Podatci[playerid][Novac]);
- ShowPlayerDialog(playerid,ON_REG,DIALOG_STYLE_MSGBOX,"{80FF00}[SERVER]",str,"Zatvori","");
- return true;
- }
- if(dialogid == LOG)
- {
- if(!response) Kick(playerid);
- if(udb_hashe(inputtext) == Podatci[playerid][Lozinka]) {
- new
- str[128];
- format(str,sizeof str,"{FFFFFF}Dobrodošli nam natrag {00FF00}%s!\n{FFFFFF}Uspješno ste se ulogirali!",GetName(playerid));
- ShowPlayerDialog(playerid,ON_LOG,DIALOG_STYLE_MSGBOX,"[SERVER]",str,"Zatvori","");
- SetPlayerScore(playerid,Podatci[playerid][Score]);
- GivePlayerMoney(playerid,Podatci[playerid][Novac]);
- rBit1_Set(Ulogiran, playerid, 1);
- if(Podatci[playerid][Zatvoren] == 1) {
- SCM(playerid,-1,"Imate nedovršenu zatvorsku kaznu! Vraćeni ste u zatvor!");
- SetPlayerInterior(playerid,6);
- SetPlayerPos(playerid,264.1759,77.7382,1001.0391);
- SetPlayerCameraPos(playerid,264.1759,77.7382,1001.0391); }
- } else {
- new strg[128];
- format(strg,sizeof strg,"{FFFFFF}Dobrodošli nam natrag {00FF00}%s!\n{FFFFFF}{FFFFFF}Ukucali ste pogrešnu lozinku pokušajte ponovo!", GetName(playerid));
- ShowPlayerDialog(playerid,LOG,DIALOG_STYLE_PASSWORD,"{80FF00}[SERVER]",strg,"Login", "Kick");
- SetPVarInt(playerid, "PogresniPW", GetPVarInt(playerid, "PogresniPW") + 1);
- if(GetPVarInt(playerid, "PogresniPW") == 3)
- {
- SCM(playerid,0x33AA33AA,"[SERVER] Kickani ste automatski! Razlog : 3 puta ste ukucali pogrešnu lozinku!");
- Kick(playerid); }
- }
- return true; }
- if(dialogid == PJESMAZAMENE)
- {
- if(!response) return SCM(playerid,-1,"{80FF00}Ugasili ste pjesmu!"),StopAudioStreamForPlayer(playerid);
- if(strfind(inputtext, "www") != -1) {
- PlayAudioStreamForPlayer(playerid,inputtext);
- CC(playerid);
- SCM(playerid,-1,"{80FF00}Uspješno ste pustili pjesmu!"); }
- return true;
- }
- if(dialogid == PJESMAZASVE)
- {
- new
- str[128];
- if(!response) return SCMTA(-1,"{80FF00}Admin je ugasio pjesmu svima!"),StopAudioStreamForAll();
- if(strfind(inputtext, "www") != -1) {
- PlayAudioStreamForAll(inputtext);
- CC4All();
- format(str,sizeof str,"{80FF00}Admin %s je svima pustio pjesmu!",GetName(playerid));
- SCMTA(-1,str); }
- }
- if(dialogid == GOTO)
- {
- if(listitem == 0) {
- if(GetPlayerState(playerid) == 2) {
- new carid = GetPlayerVehicleID(playerid);
- SetVehiclePos(carid, 1529.6,-1691.2,13.3);
- SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
- SetPlayerInterior(playerid,0);
- PutPlayerInVehicle(playerid, carid, 0);
- SCM(playerid,0x33AA33AA,"Teleportirani ste u Los Santos!"); } }
- }
- if(listitem == 1) {
- if(GetPlayerState(playerid) == 2) {
- new carid = GetPlayerVehicleID(playerid);
- SetVehiclePos(carid,-1535.8799,737.2873,7.1875);
- SetPlayerPos(playerid,-1535.8799,737.2873,7.1875);
- SetPlayerInterior(playerid,0);
- PutPlayerInVehicle(playerid, carid, 0);
- SCM(playerid,0x33AA33AA,"Teleportirani ste u San Fierro!"); } }
- if(listitem == 2) {
- if(GetPlayerState(playerid) == 2) {
- new carid = GetPlayerVehicleID(playerid);
- SetVehiclePos(carid,1699.2, 1435.1, 11.7);
- SetPlayerPos(playerid,1699.2, 1435.1, 11.7);
- SetPlayerInterior(playerid,0);
- PutPlayerInVehicle(playerid,carid,0);
- SCM(playerid,0x33AA33AA,"Teleportirani ste u Las Venturas!"); } }
- return true; }
- /********************************FUNKCIJE**************************************/
- stock CC(playerid)
- {
- for(new c; c < 20; c++) SendClientMessage(playerid,-1," ");
- }
- stock CC4All()
- {
- foreach(Player,i) {
- for(new c; c < 20; c++) SendClientMessage(i,-1," "); }
- }
- stock PlayAudioStreamForAll(link[]) /* by Matt */
- {
- foreach(Player,i)
- {
- PlayAudioStreamForPlayer(i,link);
- }
- return true;
- }
- stock StopAudioStreamForAll() /* by Matt */
- {
- foreach(Player,i)
- {
- StopAudioStreamForPlayer(i);
- }
- return true;
- }
- stock udb_hashe(buf[]) { /* by DracoBlue */
- 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;
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof name);
- return name;
- }
- forward Load_data(playerid,name[],value[]);
- public Load_data(playerid,name[],value[]) /* Y_less */
- {
- INI_Int("Lozinka",Podatci[playerid][Lozinka]);
- INI_Int("Novac",Podatci[playerid][Novac]);
- INI_Int("Score",Podatci[playerid][Score]);
- INI_Int("Admin",Podatci[playerid][Admin]);
- INI_Int("Warns",Podatci[playerid][Warns]);
- INI_Int("Skin",Podatci[playerid][Skin]);
- INI_Int("Zatvoren",Podatci[playerid][Zatvoren]);
- INI_Int("Mutean",Podatci[playerid][Mutean]);
- return true;
- }
- stock AdminPoruka(boja, const str[])
- {
- foreach(Player, i)
- {
- if(Podatci[i][Admin] >= GAMEMASTER) return SendClientMessage(i,boja,str);
- }
- return true;
- }
- forward Muted(playerid);
- public Muted(playerid)
- {
- KillTimer(MutedVrijeme[playerid]);
- SCM(playerid,-1,"{00FFFF}Vaše mute vrijeme je završilo! Sada možete pričati!");
- Podatci[playerid][Mutean] = 0;
- }
- forward Freezan(playerid);
- public Freezan(playerid)
- {
- KillTimer(FreezeVrijeme[playerid]);
- SCM(playerid,-1,"{00FFFF}Vaše freeze vrijeme je završilo!");
- rBit1_Set(Freezed,playerid,0);
- }
- forward Jailan(playerid);
- public Jailan(playerid)
- {
- KillTimer(JailedVrijeme[playerid]);
- SCM(playerid,-1,"{00FFFF}Vaša zatvorska kazna je završila! Sada ste slobodan građanin!");
- Podatci[playerid][Zatvoren] = 0;
- SetPlayerPos(playerid,1958.33, 1343.12, 15.36);
- SetPlayerCameraPos(playerid,1958.33, 1343.12, 15.36);
- SetPlayerInterior(playerid,0);
- GameTextForPlayer(playerid,"~y~Sloboda~n~~w~pokusajte biti bolji gradanin",4000,6);
- }
- /***********************************KOMANDE************************************/
- YCMD:makeadmin(playerid,params[], help) {
- #pragma unused help
- new
- pid,
- lvl,
- str[128];
- if(Podatci[playerid][Admin] == ADM_LVL_3) {
- if(sscanf(params,"ud", pid,lvl)) return SCM(playerid,-1,"{FFFFFF}KORISTI: /makeadmin [id] [admin level 1 = Gamemaster , 2 = Admin Level 2 , 3 = Admin Level 3]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF0000}GREŠKA: {FFFFFF}Ovaj igrač nije na serveru!");
- else if(lvl > 3 || lvl < 0) return SCM(playerid,-1,"{FF0000}GREŠKA: {FFFFFF}Možete koristiti samo Admin levele : 1,2,3 !");
- else
- Podatci[pid][Admin] = lvl;
- format(str,sizeof str,"{00FF00}Admin {FFFFFF}%s vam je dao admin level {FFFFFF}%d !", GetName(playerid),lvl);
- SCM(pid,-1,str); }
- return true; }
- YCMD:stats(playerid,params[], help) {
- #pragma unused params
- #pragma unused help
- new stat[256];
- format(stat,sizeof stat,"{FFFF00}Ime : {FFFFFF}%s | {FFFF00}Score : {FFFFFF}%d | {FFFF00}Novac : {FFFFFF}%d\n{FFFF00}Warns : {FFFFFF}%d | {FFFF00}Admin Level : {FFFFFF}%d | {FFFF00}Skin ID : {FFFFFF}%d", GetName(playerid),GetPlayerScore(playerid),GetPlayerMoney(playerid),Podatci[playerid][Warns],Podatci[playerid][Admin],GetPlayerSkin(playerid));
- ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"** Vaša osobna iskaznica **",stat,"Spremi","");
- return true; }
- YCMD:clearchat(playerid, params[], help) {
- #pragma unused params
- #pragma unused help
- new str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- foreach(Player,i) {
- for(new c; c < 20; c++) SendClientMessage(i,-1," ");
- format(str,sizeof str,"{00FF00}Admin %s je obrisao chat!", GetName(playerid));
- SCMTA(-1,str); } }
- return true; }
- YCMD:setmoney(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTITE: /givemoney [id] [kolicina]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"GREŠKA: Ovaj igrač nije na serveru!");
- else if(val > 99999999 || val < 0) return SCM(playerid,-1,"GREŠKA: Koristite brojeve od 0 do 99999999!");
- else
- GivePlayerMoney(pid,val);
- format(str,sizeof str,"{00FF00}Admin %s vam je dao nešto novaca : $%d",GetName(playerid),val);
- SCM(pid,-1,str); }
- return true; }
- YCMD:setscore(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ud", pid,val)) return SendClientMessage(playerid,-1,"KORISTITE: /setscore [id] [kolicina]");
- else if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"GREŠKA: Ovaj igrac nije na serveru!");
- else if(val > 9999 || val < 0) return SCM(playerid,-1,"GREŠKA: Možete koristiti brojeve od 0 do 9999!");
- else
- SetPlayerScore(pid,GetPlayerScore(pid) + val);
- format(str,sizeof str,"{00FF00}Admin %s ti je dao %d boda!",GetName(playerid),val);
- SCM(pid,-1,str); }
- return true; }
- YCMD:givewarn(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- reason[128],
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "us[128]d", pid, reason, val)) return SendClientMessage(playerid, -1, "KORISTI: /givewarn [id] [razlog] [kolicina]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF0000}GREŠKA: Ovaj igrač nije na serveru!");
- else if(val < 0 || val > 3) return SCM(playerid,-1,"{FF0000}GREŠKA: Možete koristiti brojeve od 0 do 3!");
- else
- Podatci[pid][Warns] = Podatci[pid][Warns] + val;
- format(str,sizeof str,"{00FF00}Admin %s vam je dao %d warninga! Razlog : %s", GetName(playerid),val,reason);
- SCM(pid,-1,str); }
- if(Podatci[pid][Warns] >= 3)
- {
- new
- str2[128],
- str3[128];
- format(str2,sizeof str2,"{FF0000}[SERVER] %s je dobio ban od admina %s! Razlog : 3 Warna!", GetName(pid),GetName(playerid));
- SCMTA(-1,str2);
- format(str3,sizeof str3,"{FF0000}[SERVER] Banani ste od strane Admina %s! Razlog : 3 Warna!", GetName(playerid));
- SCM(pid,-1,str3);
- SCM(pid,-1,"{00FFFF}Ukoliko mislite da ste krivo banani , molimo vas pratite sljedece upute :");
- SCM(pid,-1,"{FF0000}--------------------------------------------------------------------------");
- SCM(pid,-1,"{00FFFF}Odite na naš forum (www.forum.com) i otvorite temu u određenom pdf-u");
- SetPlayerPos(playerid,5,5,5);
- SetPlayerCameraPos(playerid, 5,5,35);
- SetPlayerCameraLookAt(playerid, 5,5,35);
- Ban(pid);
- }
- return true; }
- YCMD:help(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- new
- str[256];
- strcat(str,"\n/stats | /pm | /togpm | /new | /report");
- strcat(str,"\n/pay | /eject | /admins | /kill");
- ShowPlayerDialog(playerid,KOMANDE,DIALOG_STYLE_MSGBOX,"[SERVER KOMANDE]",str,"Zatvori","");
- return true; }
- YCMD:gmx(playerid,params[],help) { /*custom*/
- #pragma unused params
- #pragma unused help
- if(Podatci[playerid][Admin] == ADM_LVL_3) {
- GameTextForAll("GMX",11000,6);
- foreach(Player, i) {
- new
- stra[256];
- format(stra,sizeof stra,"/mIgraci/%s.ini",GetName(playerid));
- new
- INI:dat = INI_Open(stra);
- INI_SetTag(dat,"data");
- INI_WriteInt(dat,"Novac",GetPlayerMoney(i));
- INI_WriteInt(dat,"Score",GetPlayerScore(i));
- INI_WriteInt(dat,"Admin",Podatci[i][Admin]);
- INI_WriteInt(dat,"Warns",Podatci[i][Warns]);
- INI_WriteInt(dat,"Skin",GetPlayerSkin(i));
- INI_Close(dat);
- SendRconCommand("gmx"); } }
- return true; }
- YCMD:veh(playerid,params[],help) {
- #pragma unused help
- new
- vehid,
- restime,
- Float:Pos[4];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ii", vehid,restime)) return SCM(playerid,-1,"KORISTITE: /veh [car id] [respawn time]");
- if(vehid < 400 || vehid > 611) return SCM(playerid,-1,"GREŠKA: Odaberite ID vozila između 400 i 611!");
- else
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- CreateVehicle(vehid,Pos[0]+3,Pos[1],Pos[2],Pos[3],random(126),random(126),restime);
- SCM(playerid,-1,"{00FF00}Uspješno ste stvorili vozilo!"); }
- return true; }
- YCMD:mute(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- vr,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "uis[128]", pid,vr,razlog)) return SCM(playerid,-1,"KORISTITE: /mute [id] [vrijeme mutea (u sekundama)] [razlog]");
- if(Podatci[playerid][Mutean] == 1) return SCM(playerid,-1,"Taj je igrač već mutean!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- MutedVrijeme[pid] = SetTimerEx("Muted", vr*1000, 0, "d", pid);
- Podatci[pid][Mutean] = 1;
- format(str,sizeof str,"{00FF00}Muteani ste od strane admina %s na %d sekundi! Razlog : %s!", GetName(playerid),vr,razlog);
- SCM(pid,-1,str); }
- return true; }
- YCMD:unmute(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unmute [id]");
- if(Podatci[playerid][Mutean] == 0) return SCM(playerid,-1,"Taj igrač nije mutean!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- KillTimer(MutedVrijeme[pid]);
- Podatci[pid][Mutean] = 0;
- format(str,sizeof str,"{00FF00}Admin %s vas je odmuteao! Sada možete pričati!", GetName(playerid));
- SCM(pid,-1,str); }
- return true; }
- YCMD:freeze(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- vr,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "uis[128]", pid,vr,razlog)) return SCM(playerid,-1,"KORISTITE: /freeze [id] [vrijeme freezea (u sekundama)] [razlog]");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Taj igrač je već zaleđen!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- FreezeVrijeme[pid] = SetTimerEx("Freezan", vr*1000, 0, "d", pid);
- rBit1_Set(Freezed,pid,1);
- format(str,sizeof str,"{00FF00}Zaleđeni ste od strane admina %s na %d sekundi! Razlog : %s!", GetName(playerid),vr,razlog);
- SCM(pid,-1,str); }
- return true; }
- YCMD:unfreeze(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unmute [id]");
- if(!rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Taj igrač nije zaleđen!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- KillTimer(FreezeVrijeme[pid]);
- rBit1_Set(Freezed,playerid,0);
- format(str,sizeof str,"Admin %s vas je odledio!", GetName(playerid));
- SCM(pid,-1,str); }
- return true; }
- YCMD:sethp(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTI: /sethp [id] [kolicina]");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
- if(val > 100 || val < 0) return SCM(playerid,-1,"{FF8000}Možete koristiti samo brojeve od 0 do 100!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF8000}Taj igrač nije na serveru!");
- else
- SetPlayerHealth(pid,val);
- format(str,sizeof str, "{00FF00}Admin %s vam je dao %d% healtha!", GetName(playerid),val);
- SCM(pid,-1,str); }
- return true; }
- YCMD:setarmor(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTI: /setarmor [id] [kolicina]");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
- if(val > 100 || val < -1) return SCM(playerid,-1,"Možete koristiti samo brojeve od 0 do 100!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- SetPlayerArmour(pid,val);
- format(str,sizeof str, "Admin %s vam je dao %d% armora!", GetName(playerid),val);
- SCM(pid,-1,str); }
- return true; }
- YCMD:pm(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- poruka[128],
- str[128];
- if(sscanf(params, "us[128]", pid,poruka)) return SCM(playerid,-1,"KORISTITE: /pm [id] [poruka]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"{FF8000}Nemožete poslati poruku tom igraču zato što je zaleđen!");
- if(Podatci[playerid][Mutean] == 1) return SCM(playerid,-1,"Nemožete slati tom igraču poruke zato što je mutean!");
- if(rBit1_Get(togglepm,pid)) return SCM(playerid,-1,"{FF8000}Nemožete poslati poruku tom igraču zato što je ugasio mobitel!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF8000}Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"{FF8000}%s vam je poslao poruku : %s",GetName(playerid),poruka);
- SCM(pid,-1,str);
- SCM(playerid,-1,str);
- GameTextForPlayer(pid,"Nova poruka",4000,6);
- return true; }
- YCMD:togpm(playerid,params[],help) {
- #pragma unused help
- new
- toggledpm;
- if(sscanf(params, "i", toggledpm)) return SCM(playerid, -1,"KORISTI: /togpm (0 - ne , 1 - da");
- if(rBit1_Get(Freezed,playerid)) return SCM(playerid,-1,"{00FFFF}Nemožete koristiti ovu poruku dok ste zaleđeni!");
- if(Podatci[playerid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu dok ste u zatvoru!");
- switch(toggledpm)
- {
- case 0:
- {
- if(!rBit1_Get(togglepm, playerid)) return SCM(playerid,-1,"{00FFFF}Nemate isključeno primanje privatnih poruka!");
- else
- rBit1_Set(togglepm,playerid,0);
- SCM(playerid,-1,"{00FF00}Uključili ste primanje privatnih poruka!");
- }
- case 1:
- {
- if(rBit1_Get(togglepm,playerid)) return SCM(playerid,-1,"{00FFFF}Već imate isključeno primanje privatnih poruka!");
- else
- rBit1_Set(togglepm,playerid,1);
- SCM(playerid,-1,"{00FF00}Isključili ste primanje privatnih poruka!"); } }
- return true; }
- YCMD:new(playerid,params[],help) {
- #pragma unused help
- new
- helpmsg[128],
- strg[128];
- if(sscanf(params, "s[128]", helpmsg)) return SCM(playerid,-1,"{00FFFF}KORISTITE: /new [poruka adminima]");
- format(strg,sizeof strg,"{00FFFF}%s šalje poruku adminima : {FFFFFF}%s", GetName(playerid),helpmsg);
- AdminPoruka(-1,strg);
- SCM(playerid,-1,"Vaš zahtjev za pomoć je poslan svim slobodnim adminima");
- return true; }
- YCMD:report(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- reportmsg[128],
- str[128],
- str1[128];
- if(sscanf(params,"us[128]", pid,reportmsg)) return SCM(playerid,0xFF80009E,"KORISTITE: /report [id] [razlog]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"Igrač %s prijavljuje igrača %s! Razlog : %s", GetName(playerid),GetName(pid),reportmsg);
- AdminPoruka(0x00FFFF9E,str);
- format(str1,sizeof str1,"Prijavili ste igrača %s adminima!", GetName(pid));
- SCM(playerid,0x00FFFF9E,str1);
- return true; }
- YCMD:check(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- checkstr[256],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /check [id]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
- else
- format(checkstr,sizeof checkstr,"{FFFF00}Ime : {FFFFFF}%s | {FFFF00}Score : {FFFFFF}%d | {FFFF00}Novac : {FFFFFF}%d\n{FFFF00}Warns : {FFFFFF}%d | {FFFF00}Admin Level : {FFFFFF}%d\n{FFFF00}Skin ID : {FFFFFF}%d",GetName(pid),GetPlayerScore(pid),GetPlayerMoney(pid),Podatci[pid][Warns],Podatci[pid][Admin],GetPlayerSkin(pid));
- ShowPlayerDialog(playerid,CHECK,DIALOG_STYLE_MSGBOX,"{FFFF00}** Administrativni pregled iskaznice **",checkstr,"Zatvori","");
- format(str,sizeof str,"Pregledavate osobnu iskaznicu igrača %s!",GetName(pid));
- SCM(playerid,-1,str); }
- return true; }
- YCMD:setskin(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- skinid,
- str[128],
- str2[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "ud", pid,skinid)) return SCM(playerid,-1,"KORISTITE: /setskin [id] [skin id]");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,0xFF80009E,"Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
- if(skinid > 299 || skinid < 0) return SCM(playerid,0xFF80009E,"Možete koristiti samo brojeve između 0 i 299!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
- else
- SetPlayerSkin(pid,skinid);
- format(str,sizeof str,"Admin %s vam je promjenio skin u skin id : %d!",GetName(playerid),skinid);
- SCM(pid,-1,str);
- format(str2,sizeof str2,"Promjenili ste %s-u skin u skin id : %d!",GetName(pid),skinid);
- SCM(playerid,-1,str2); }
- return true; }
- YCMD:playsong(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- ShowPlayerDialog(playerid,PJESMAZAMENE,DIALOG_STYLE_INPUT,"{FF8000}[SERVER RADIO]","{FF8000}Unesite link pjesme koju će te pustit samo sebi!","On","Off"); }
- return true; }
- YCMD:playsong4all(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- ShowPlayerDialog(playerid,PJESMAZASVE,DIALOG_STYLE_INPUT,"{FF8000}[SERVER RADIO]","{FF8000}Unesite link pjesme koju će te pustit svima!","On","Off"); }
- return true; }
- YCMD:ban(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /ban [id] [razlog");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"[SERVER] Admin %s je protjerao(banao) %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
- SCMTA(0xFF80009E,str);
- GameTextForPlayer(pid,"Banned",3000,6);
- SCM(pid,-1,"{00FFFF}Ukoliko mislite da ste krivo banani , molimo vas pratite sljedece upute :");
- SCM(pid,-1,"{FF0000}Otiđite na naš forum (www.tvojforum.com) i otvorite temu u određenom pdf-u!");
- SetPlayerPos(playerid,5,5,5);
- SetPlayerCameraPos(playerid, 5,5,35);
- SetPlayerCameraLookAt(playerid, 5,5,35);
- Ban(pid); }
- return true; }
- YCMD:kick(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /kick [id] [razlog]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"[SERVER] Admin %s je kickao %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
- SCMTA(0xFF80009E,str);
- GameTextForPlayer(pid,"Kicked",3000,6);
- SetPlayerPos(playerid,5,5,5);
- SetPlayerCameraPos(playerid, 5,5,35);
- SetPlayerCameraLookAt(playerid, 5,5,35);
- Kick(pid); }
- return true; }
- YCMD:fban(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /fban [id] [razlog");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"[SERVER] Admin %s je protjerao(banao) %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
- SCMTA(-1,str);
- SCM(pid,-1,"Nemoj se uplašiti , ovo je samo fake ban :)"); }
- return true; }
- YCMD:fkick(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /fkick [id] [razlog]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"[SERVER] Admin %s je kickao %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
- SCMTA(-1,str);
- SCM(pid,-1,"Nemoj se uplašiti , ovo je samo fake kick :)"); }
- return true; }
- YCMD:gethere(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- Float:Pos[4],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /gethere [id]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete portati tog igrača zato što je u zatvoru!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- SetPlayerPos(pid,Pos[0]+1,Pos[1],Pos[2]);
- format(str,sizeof str,"Teleportirani ste do admina %s!",GetName(playerid));
- SCM(pid,-1,str); }
- return true; }
- YCMD:goto(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- Float:Pos[4],
- str[128],
- str2[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /goto [id]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete portati tog igrača zato što je u zatvoru!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- GetPlayerPos(pid,Pos[0],Pos[1],Pos[2]);
- SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
- format(str,sizeof str,"Admin %s se teleportirao do vas!",GetName(playerid));
- SCM(pid,-1,str);
- format(str2,sizeof str2,"Teleportirali ste se do %-a!", GetName(pid));
- SCM(playerid,-1,str2); }
- return true; }
- YCMD:settime(playerid,params[],help) {
- #pragma unused help
- new
- vrbroj,
- str[128];
- if(Podatci[playerid][Admin] == ADM_LVL_3) {
- if(sscanf(params, "d", vrbroj)) return SCM(playerid,-1,"KORISTITE: /settime [0-23]");
- SetWorldTime(vrbroj);
- format(str,sizeof str,"Pomaknili ste sat na %d!",vrbroj);
- SCM(playerid,-1,str); }
- return true; }
- YCMD:jail(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- time,
- razlog[128],
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "uis[128]", pid,time,razlog)) return SCM(playerid,-1,"KORISTITE: /jail [id] [vrijeme (u sekundama)] [razlog]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Taj igač je već zatvoren!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- JailedVrijeme[pid] = SetTimerEx("Jailan", time*1000, 0, "d", pid);
- Podatci[pid][Zatvoren] = 1;
- ResetPlayerWeapons(pid);
- SetPlayerInterior(pid,6);
- SetPlayerPos(pid,264.1759,77.7382,1001.0391);
- SetPlayerCameraPos(pid,264.1759,77.7382,1001.0391);
- format(str,sizeof str,"Admin %s vas je zatvorio na %d sekundi! Razlog : %s",GetName(playerid),time,razlog);
- SCM(pid,-1,str);
- SCM(playerid,-1,"Uspješno ste zatvorili igrača!"); }
- return true; }
- YCMD:unjail(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- str[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unjail [id]");
- if(Podatci[pid][Zatvoren] == 0) return SCM(playerid,-1,"Taj igrač nije zatvoren!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- KillTimer(JailedVrijeme[pid]);
- Podatci[pid][Zatvoren] = 0;
- SetPlayerPos(pid,1958.33, 1343.12, 15.36);
- SetPlayerCameraPos(pid,1958.33, 1343.12, 15.36);
- SetPlayerInterior(pid,0);
- format(str,sizeof str,"Admin %s vas je unjailao!", GetName(playerid));
- SCM(pid,-1,str);
- GameTextForPlayer(pid,"~y~Sloboda~n~~w~pokusajte biti bolji gradanin",4000,6);
- SCM(playerid,-1,"Uspješno ste unjailali igrača!"); }
- return true; }
- YCMD:pay(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- val,
- str[128],
- str2[128];
- if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTITE: /pay [id] [kolicina]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati novce tom igraču zato što je u zatvoru!");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete davati novce igraču koji je zaleđen!");
- if(Podatci[playerid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati novce zato što ste u zatvoru!");
- if(rBit1_Get(Freezed,playerid)) return SCM(playerid,-1,"Nemožete davati novce zato što ste zaleđeni!");
- if(val > GetPlayerMoney(playerid)) return SCM(playerid,-1,"Nemate toliko novaca! Odaberite drugu valutu!");
- if(val < 0 || val > 99999999) return SCM(playerid,-1,"Možete davati novce između $0 i $99999999");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- GivePlayerMoney(pid,val);
- format(str,sizeof str,"Igrač %s vam je dao $%d!",GetName(playerid),val);
- SCM(pid,-1,str);
- format(str2,sizeof str2,"Igrač %s je dao igraču %s $%d!",GetName(playerid),GetName(pid),val);
- AdminPoruka(-1,str2);
- return true; }
- YCMD:specon(playerid, params[],help) {
- #pragma unused help
- new
- pid,
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /specon [id]");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- format(str,sizeof str,"Počeli ste spectat igrača %s!",GetName(pid));
- SCM(playerid,-1,str);
- TogglePlayerSpectating(playerid, 1);
- SetPlayerInterior(playerid, GetPlayerInterior(pid));
- PlayerSpectatePlayer(playerid, pid, 1);
- rBit1_Set(Specting,playerid,1); }
- return true; }
- YCMD:specoff(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(!rBit1_Get(Specting,playerid)) return SCM(playerid,0x00FF409E,"Nikoga nespectate!");
- rBit1_Set(Specting,playerid,0);
- SCM(playerid,0x00FF009E,"Prestali ste spectat igrača!");
- TogglePlayerSpectating(playerid,0); }
- return true; }
- YCMD:eject(playerid,params[],help) {
- #pragma unused help
- new
- vID,
- pid,
- pstate = GetPlayerState(playerid),
- str[128],
- str2[128];
- if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /eject [id]");
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,"Niste u vozilu!");
- if(pstate == PLAYER_STATE_PASSENGER) return SCM(playerid,-1,"Samo vozači mogu koristiti ovu komandu!");
- vID = GetPlayerVehicleID(playerid);
- if(!IsPlayerInVehicle(pid,vID)) return SCM(playerid,-1,"Taj igrač nije u vašem vozilu!");
- else
- RemovePlayerFromVehicle(pid);
- format(str,sizeof str,"Igrač %s vas je izbacio iz vozila!", GetName(playerid));
- SCM(pid,-1,str);
- format(str2,sizeof str2,"Izbacili ste %s-a iz vašeg vozila!", GetName(pid));
- SCM(playerid,-1,str2);
- return true; }
- YCMD:admini(playerid, params[], help) {
- #pragma unused help
- #pragma unused params
- new str[256];
- SCM(playerid,0x00FF409E,"|____________ONLINE ADMINI____________|");
- foreach(Player, i)
- if(Podatci[i][Admin] == ADM_LVL_3) {
- format(str, sizeof(str), "{FFFFFF}ADMIN LEVEL 3 | {FFFFFF}%s", GetName(i));
- SCM(playerid,-1,str); }
- else if(Podatci[i][Admin] == ADM_LVL_2) {
- format(str, sizeof(str), "{FFFFFF}ADMIN LEVEL 2 | {FFFFFF}%s", GetName(i));
- SCM(playerid,-1,str); }
- else if(Podatci[i][Admin] == GAMEMASTER) {
- format(str, sizeof(str), "{FFFFFF}GAMEMASTER | {FFFFFF}%s", GetName(i));
- SCM(playerid,-1,str); }
- SCM(playerid,0x00FF409E,"|____________ONLINE ADMINI____________|");
- return true; }
- YCMD:a(playerid, params[], help) {
- #pragma unused help
- new
- strt[128],
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(sscanf(params, "s[128]", strt)) return SCM(playerid,-1, "KORISTI: /a [admin chat poruka]");
- if(Podatci[playerid][Admin] == ADM_LVL_3) {
- format(str, sizeof(str), "{FFFF00}Admin Lvl 3 %s: {FFFFFF}%s", GetName(playerid), strt); }
- if(Podatci[playerid][Admin] == ADM_LVL_2) {
- format(str, sizeof(str), "{FFFF00}Admin Lvl 2 %s: {FFFFFF}%s", GetName(playerid), strt); }
- if(Podatci[playerid][Admin] == GAMEMASTER) {
- format(str, sizeof(str), "{FFFF00}Gamemaster %s: {FFFFFF}%s", GetName(playerid), strt); }
- AdminPoruka(-1,str); }
- return true; }
- YCMD:ann(playerid,params[],help) {
- #pragma unused help
- new
- anntekst[128],
- str[128];
- if(Podatci[playerid][Admin] == ADM_LVL_3) {
- if(sscanf(params, "s[128]", anntekst)) return SCM(playerid,-1,"KORISTITE: /ann [tekst]");
- format(str,sizeof str,"%s : %s", GetName(playerid),anntekst);
- GameTextForAll(str,3000,6); }
- return true; }
- YCMD:giveweapon(playerid,params[],help) {
- #pragma unused help
- new
- pid,
- gunid,
- ammo,
- str[128],
- str2[128];
- if(Podatci[playerid][Admin] >= ADM_LVL_2) {
- if(sscanf(params, "udd", pid,gunid,ammo)) return SCM(playerid,-1,"KORISTITE: /giveweapon [id] [oruzje id] [kolicina]");
- if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati oružje tom igraču zato što je u zatvoru!");
- if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete ovom igraču dat oružje zato što je zaleđen!");
- else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
- else
- GivePlayerWeapon(playerid, gunid, ammo);
- format(str,sizeof str,"Admin %s vam je dao oružje id %d i %d metaka!", GetName(playerid),gunid,ammo);
- SCM(pid,-1,str);
- format(str2,sizeof str2,"Dali ste igraču %s oružje!", GetName(pid));
- SCM(playerid,-1,str); }
- return true; }
- YCMD:kill(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- SetPlayerHealth(playerid, -1);
- SCM(playerid,-1,"Počinili ste samoubojstvo!");
- return true; }
- YCMD:ahelp(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- new
- str[860];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- strcat(str,"\n{80FFFF}GAMEMASTER KOMANDE :");
- strcat(str,"\n{FFFFFF}/ban | /kick | /fkick | /fban | /goto | /gethere | /specon | /specoff | /achat | /aonduty | /aoffduty");
- strcat(str,"\n\n{80FFFF}ADMIN LEVEL 2 KOMANDE :");
- strcat(str,"\n{FFFFFF}/setarmor | /sethp | /freeze | /unfreeze | /mute | /unmute | /veh | /aonduty | /aoffduty");
- strcat(str,"\n{FFFFFF}/givewarn | /setscore | /setmoney | /clearchat | /check | /setskin");
- strcat(str,"\n{FFFFFF}/playsong | /playsong4all | /ban | /kick | /fban | /fkick | /settime");
- strcat(str,"\n{FFFFFF}/goto | /gethere | /jail | /unjail | /specon | specoff | /achat | /ann | /giveweapon");
- strcat(str,"\n\n{80FFFF}ADMIN LEVEL 3 KOMANDE :");
- strcat(str,"\n{FFFFFF}/ban | /kick | /fkick | /fban | /goto | /gethere | /specon | /specoff | /achat");
- strcat(str,"\n{FFFFFF}/setarmor | /sethp | /freeze | /unfreeze | /mute | /unmute | /veh");
- strcat(str,"\n{FFFFFF}/givewarn | /setscore | /setmoney | /clearchat | /check | /setskin");
- strcat(str,"\n{FFFFFF}/playsong | /playsong4all | /settime | /aonduty | /aoffduty");
- ShowPlayerDialog(playerid,ADMKOMANDE,DIALOG_STYLE_MSGBOX,"{80FFFF}[ADMIN KOMANDE]",str,"Zatvori",""); }
- return true; }
- YCMD:adutyon(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- new
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(GetPVarInt(playerid,"onDuty") == 1) return SCM(playerid,0x33AA33AA,"Već ste na dužnosti!");
- SetPVarInt(playerid,"onDuty",1);
- format(str,sizeof str,"Admin %s je sada na dužnosti!", GetName(playerid));
- SCMTA(-1,str);
- SetPlayerHealth(playerid,999);
- SetPlayerArmour(playerid,999);
- SetPlayerColor(playerid,0x33AA33AA); }
- return true; }
- YCMD:adutyoff(playerid,params[],help) {
- #pragma unused help
- #pragma unused params
- new
- str[128];
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- if(GetPVarInt(playerid,"onDuty") == 0) return SCM(playerid,-1,"Vi niste na dužnosti!");
- SetPVarInt(playerid,"onDuty", 0);
- SCM(playerid,-1,"Više niste na dužnosti!");
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,0);
- format(str,sizeof str,"Admin %s više nije na dužnosti!",GetName(playerid));
- SetPlayerColor(playerid,-1);
- SCMTA(-1,str); }
- return true; }
- YCMD:gotopick(playerid, params[],help) {
- #pragma unused help
- #pragma unused params
- if(Podatci[playerid][Admin] >= GAMEMASTER) {
- ShowPlayerDialog(playerid,GOTO,DIALOG_STYLE_LIST,"[GOTO ODABERI]","Los Santos\nSan Fierro\nLas Venturas","Odaberi","Odustani"); }
- return true; }
- /*******************************************************************************
- EOS
- Skripta napravljena 13.11.2011
- Credits :
- Matt - napravio cijelu skriptu
- Y_Less - ycmd & y_ini
- RyDeR - rBits
- DracoBlue - udb hasher
- System32
- Nemate pravo :
- Uzimati ovu skriptu te je predstavljati kao svoju!
- Prodavati je prethodno bez moje dozvole!
- *******************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement