Advertisement
Guest User

Untitled

a guest
Nov 13th, 2011
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 41.71 KB | None | 0 0
  1. /****************************
  2.  
  3.     m_Admin&Register System
  4.            v1.0
  5.            
  6. *****************************/
  7.  
  8. #define FILTERSCRIPT
  9.  
  10. #include <a_samp> /* Credits to SA-MP Team */
  11. #include <YSI\y_ini> /* Credits to Y_Less */
  12. #include <YSI\y_commands> /* Credits to Y_Less */
  13. #include <sscanf2> /* Credits to Y_Less */
  14. #include <rBits> /* Credits to RyDeR */
  15. #include <foreach> /* Credits to Y_Less */
  16.  
  17. /*dialozi*/
  18. #define REG 1
  19. #define LOG 2
  20. #define ON_REG 4
  21. #define ON_LOG 5
  22. #define LOG_FAIL 6
  23. #define KOMANDE 7
  24. #define CHECK 8
  25. #define STATS 9
  26. #define PJESMAZAMENE 10
  27. #define PJESMAZASVE 11
  28. #define ADMKOMANDE 12
  29. #define GOTO 13
  30.  
  31. /*admin leveli*/
  32. #define ADM_LVL_3 3
  33. #define GAMEMASTER 1
  34. #define ADM_LVL_2 2
  35.  
  36. /*ostalo*/
  37. #define SCM(%0,%1,%2) SendClientMessage(%0,%1,%2)
  38. #define SCMTA(%1,%2) SendClientMessageToAll(%1,%2)
  39.  
  40.  
  41. enum info
  42. {
  43.     Score,
  44.     Novac,
  45.     Lozinka,
  46.     Admin,
  47.     Warns,
  48.     Skin,
  49.     Zatvoren,
  50.     Mutean
  51. };
  52. new Podatci[MAX_PLAYERS][info];
  53. new MutedVrijeme[MAX_PLAYERS],
  54.     FreezeVrijeme[MAX_PLAYERS],
  55.     JailedVrijeme[MAX_PLAYERS];
  56.  
  57. new rBit1: Ulogiran <MAX_PLAYERS>;
  58. new rBit1: Freezed <MAX_PLAYERS>;
  59. new rBit1: togglepm <MAX_PLAYERS>;
  60. new rBit1: Specting <MAX_PLAYERS>;
  61.  
  62. public OnPlayerConnect(playerid)
  63. {
  64.     rBit1_Set(Ulogiran, playerid, 0);
  65.     new stra[256],name[MAX_PLAYER_NAME];
  66.     GetPlayerName(playerid,name,sizeof(name));
  67.     format(stra,sizeof(stra),"/mIgraci/%s.ini",name);
  68.     if(!fexist(stra)) {
  69.         ShowPlayerDialog(playerid,REG,DIALOG_STYLE_PASSWORD,"{00FFFF}[SERVER] Registracija","{FFFFFF}Upisite zeljenu lozinku da bi ste se registrirali!","Registriraj","Kick");
  70.     }
  71.     else {
  72.         INI_ParseFile(stra, "Load_%s", .bExtra = true, .extra = playerid);
  73.         ShowPlayerDialog(playerid,LOG,DIALOG_STYLE_PASSWORD,"{00FFFF}[SERVER] Logiranje","{FFFFFF}Upisite vašu lozinku da bi ste se ulogirali!","Login","Kick");
  74.     }
  75.     return true;
  76. }
  77.  
  78. public OnPlayerRequestClass(playerid, classid)
  79. {
  80.   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 //
  81.   SpawnPlayer(playerid);
  82.   return true;
  83. }
  84.  
  85. public OnPlayerDisconnect(playerid, reason)
  86. {
  87.     if(rBit1_Get(Ulogiran, playerid))
  88.     {
  89.         new
  90.              stra[256];
  91.         format(stra,sizeof stra,"/mIgraci/%s.ini",GetName(playerid));
  92.         new
  93.             INI:dat = INI_Open(stra);
  94.         INI_SetTag(dat,"data");
  95.         INI_WriteInt(dat,"Novac",GetPlayerMoney(playerid));
  96.         INI_WriteInt(dat,"Score",GetPlayerScore(playerid));
  97.         INI_WriteInt(dat,"Admin",Podatci[playerid][Admin]);
  98.         INI_WriteInt(dat,"Warns",Podatci[playerid][Warns]);
  99.         INI_WriteInt(dat,"Skin",GetPlayerSkin(playerid));
  100.         INI_WriteInt(dat,"Zatvoren",Podatci[playerid][Zatvoren]);
  101.         INI_WriteInt(dat,"Mutean",Podatci[playerid][Mutean]);
  102.         INI_Close(dat);
  103.     }
  104.     rBit1_Set(Ulogiran, playerid, 0);
  105.     return true;
  106. }
  107.  
  108. public OnPlayerText(playerid, text[])
  109. {
  110.     if(Podatci[playerid][Mutean] == 1)
  111.     {
  112.         SCM(playerid, -1, "Nemožete pričati zato što ste ušutkani (muteani)!");
  113.         return false;
  114.     }
  115.     return true;
  116. }
  117.  
  118. 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; }
  119.  
  120. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  121. {
  122.         if(dialogid == REG)
  123.         {
  124.             if(!response) Kick(playerid);
  125.             new stra[256];
  126.             format(stra,sizeof(stra),"/mIgraci/%s.ini",GetName(playerid));
  127.             new
  128.             INI:dat = INI_Open(stra);
  129.             INI_SetTag(dat,"data");
  130.             INI_WriteInt(dat,"Lozinka",udb_hashe(inputtext));
  131.             INI_WriteInt(dat,"Novac",1200);
  132.             INI_WriteInt(dat,"Score",0);
  133.             INI_WriteInt(dat,"Admin",0);
  134.             INI_WriteInt(dat,"Warns",0);
  135.             INI_WriteInt(dat,"Skin",random(299));
  136.             INI_WriteInt(dat,"Zatvoren",0);
  137.             INI_WriteInt(dat,"Mutean",0);
  138.             INI_Close(dat);
  139.             rBit1_Set(Ulogiran, playerid, 1);
  140.             Podatci[playerid][Novac] = 1200;
  141.             Podatci[playerid][Skin] = random(299);
  142.             SetPlayerSkin(playerid,Podatci[playerid][Skin]);
  143.             GivePlayerMoney(playerid,Podatci[playerid][Novac]);
  144.             new str[256];
  145.             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]);
  146.             ShowPlayerDialog(playerid,ON_REG,DIALOG_STYLE_MSGBOX,"{80FF00}[SERVER]",str,"Zatvori","");
  147.             return true;
  148.         }
  149.         if(dialogid == LOG)
  150.         {
  151.             if(!response) Kick(playerid);
  152.             if(udb_hashe(inputtext) == Podatci[playerid][Lozinka]) {
  153.             new
  154.                  str[128];
  155.             format(str,sizeof str,"{FFFFFF}Dobrodošli nam natrag {00FF00}%s!\n{FFFFFF}Uspješno ste se ulogirali!",GetName(playerid));
  156.             ShowPlayerDialog(playerid,ON_LOG,DIALOG_STYLE_MSGBOX,"[SERVER]",str,"Zatvori","");
  157.             SetPlayerScore(playerid,Podatci[playerid][Score]);
  158.             GivePlayerMoney(playerid,Podatci[playerid][Novac]);
  159.             rBit1_Set(Ulogiran, playerid, 1);
  160.             if(Podatci[playerid][Zatvoren] == 1) {
  161.             SCM(playerid,-1,"Imate nedovršenu zatvorsku kaznu! Vraćeni ste u zatvor!");
  162.             SetPlayerInterior(playerid,6);
  163.             SetPlayerPos(playerid,264.1759,77.7382,1001.0391);
  164.             SetPlayerCameraPos(playerid,264.1759,77.7382,1001.0391); }
  165.             } else {
  166.             new strg[128];
  167.             format(strg,sizeof strg,"{FFFFFF}Dobrodošli nam natrag {00FF00}%s!\n{FFFFFF}{FFFFFF}Ukucali ste pogrešnu lozinku pokušajte ponovo!", GetName(playerid));
  168.             ShowPlayerDialog(playerid,LOG,DIALOG_STYLE_PASSWORD,"{80FF00}[SERVER]",strg,"Login", "Kick");
  169.             SetPVarInt(playerid, "PogresniPW", GetPVarInt(playerid, "PogresniPW") + 1);
  170.             if(GetPVarInt(playerid, "PogresniPW") == 3)
  171.             {
  172.                     SCM(playerid,0x33AA33AA,"[SERVER] Kickani ste automatski! Razlog : 3 puta ste ukucali pogrešnu lozinku!");
  173.                     Kick(playerid);  }
  174.             }
  175.             return true; }
  176.         if(dialogid == PJESMAZAMENE)
  177.         {
  178.           if(!response) return SCM(playerid,-1,"{80FF00}Ugasili ste pjesmu!"),StopAudioStreamForPlayer(playerid);
  179.           if(strfind(inputtext, "www") != -1) {
  180.           PlayAudioStreamForPlayer(playerid,inputtext);
  181.           CC(playerid);
  182.           SCM(playerid,-1,"{80FF00}Uspješno ste pustili pjesmu!"); }
  183.           return true;
  184.         }
  185.         if(dialogid == PJESMAZASVE)
  186.         {
  187.           new
  188.                str[128];
  189.           if(!response) return SCMTA(-1,"{80FF00}Admin je ugasio pjesmu svima!"),StopAudioStreamForAll();
  190.           if(strfind(inputtext, "www") != -1) {
  191.           PlayAudioStreamForAll(inputtext);
  192.           CC4All();
  193.           format(str,sizeof str,"{80FF00}Admin %s je svima pustio pjesmu!",GetName(playerid));
  194.           SCMTA(-1,str); }
  195.         }
  196.         if(dialogid == GOTO)
  197.         {
  198.         if(listitem == 0) {
  199.         if(GetPlayerState(playerid) == 2) {
  200.         new carid = GetPlayerVehicleID(playerid);
  201.         SetVehiclePos(carid, 1529.6,-1691.2,13.3);
  202.         SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
  203.         SetPlayerInterior(playerid,0);
  204.         PutPlayerInVehicle(playerid, carid, 0);
  205.         SCM(playerid,0x33AA33AA,"Teleportirani ste u Los Santos!"); } }
  206.         }
  207.         if(listitem == 1) {
  208.         if(GetPlayerState(playerid) == 2) {
  209.         new carid = GetPlayerVehicleID(playerid);
  210.         SetVehiclePos(carid,-1535.8799,737.2873,7.1875);
  211.         SetPlayerPos(playerid,-1535.8799,737.2873,7.1875);
  212.         SetPlayerInterior(playerid,0);
  213.         PutPlayerInVehicle(playerid, carid, 0);
  214.         SCM(playerid,0x33AA33AA,"Teleportirani ste u San Fierro!"); } }
  215.         if(listitem == 2) {
  216.         if(GetPlayerState(playerid) == 2) {
  217.         new carid = GetPlayerVehicleID(playerid);
  218.         SetVehiclePos(carid,1699.2, 1435.1, 11.7);
  219.         SetPlayerPos(playerid,1699.2, 1435.1, 11.7);
  220.         SetPlayerInterior(playerid,0);
  221.         PutPlayerInVehicle(playerid,carid,0);
  222.         SCM(playerid,0x33AA33AA,"Teleportirani ste u Las Venturas!"); } }
  223.         return true; }
  224.  
  225. /********************************FUNKCIJE**************************************/
  226.  
  227. stock CC(playerid)
  228. {
  229.   for(new c; c < 20; c++) SendClientMessage(playerid,-1,"  ");
  230. }
  231.  
  232. stock CC4All()
  233. {
  234.   foreach(Player,i) {
  235.   for(new c; c < 20; c++) SendClientMessage(i,-1,"  "); }
  236. }
  237.  
  238. stock PlayAudioStreamForAll(link[]) /* by Matt */
  239. {
  240.   foreach(Player,i)
  241.   {
  242.    PlayAudioStreamForPlayer(i,link);
  243.   }
  244.   return true;
  245. }
  246.  
  247. stock StopAudioStreamForAll() /* by Matt */
  248. {
  249.   foreach(Player,i)
  250.   {
  251.    StopAudioStreamForPlayer(i);
  252.   }
  253.   return true;
  254. }
  255.  
  256. stock udb_hashe(buf[]) { /* by DracoBlue */
  257.     new length=strlen(buf);
  258.     new s1 = 1;
  259.     new s2 = 0;
  260.     new n;
  261.     for (n=0; n<length; n++)
  262.     {
  263.        s1 = (s1 + buf[n]) % 65521;
  264.        s2 = (s2 + s1)     % 65521;
  265.     }
  266.     return (s2 << 16) + s1;
  267. }
  268.  
  269. stock GetName(playerid)
  270. {
  271.   new name[MAX_PLAYER_NAME];
  272.   GetPlayerName(playerid,name,sizeof name);
  273.   return name;
  274. }
  275.  
  276. forward Load_data(playerid,name[],value[]);
  277. public Load_data(playerid,name[],value[]) /* Y_less */
  278. {
  279.         INI_Int("Lozinka",Podatci[playerid][Lozinka]);
  280.         INI_Int("Novac",Podatci[playerid][Novac]);
  281.         INI_Int("Score",Podatci[playerid][Score]);
  282.         INI_Int("Admin",Podatci[playerid][Admin]);
  283.         INI_Int("Warns",Podatci[playerid][Warns]);
  284.         INI_Int("Skin",Podatci[playerid][Skin]);
  285.         INI_Int("Zatvoren",Podatci[playerid][Zatvoren]);
  286.         INI_Int("Mutean",Podatci[playerid][Mutean]);
  287.         return true;
  288. }
  289.  
  290. stock AdminPoruka(boja, const str[])
  291. {
  292.     foreach(Player, i)
  293.     {
  294.     if(Podatci[i][Admin] >= GAMEMASTER) return SendClientMessage(i,boja,str);
  295.     }
  296.     return true;
  297. }
  298.  
  299. forward Muted(playerid);
  300. public Muted(playerid)
  301. {
  302.   KillTimer(MutedVrijeme[playerid]);
  303.   SCM(playerid,-1,"{00FFFF}Vaše mute vrijeme je završilo! Sada možete pričati!");
  304.   Podatci[playerid][Mutean] = 0;
  305. }
  306.  
  307. forward Freezan(playerid);
  308. public Freezan(playerid)
  309. {
  310.   KillTimer(FreezeVrijeme[playerid]);
  311.   SCM(playerid,-1,"{00FFFF}Vaše freeze vrijeme je završilo!");
  312.   rBit1_Set(Freezed,playerid,0);
  313. }
  314.  
  315. forward Jailan(playerid);
  316. public Jailan(playerid)
  317. {
  318.   KillTimer(JailedVrijeme[playerid]);
  319.   SCM(playerid,-1,"{00FFFF}Vaša zatvorska kazna je završila! Sada ste slobodan građanin!");
  320.   Podatci[playerid][Zatvoren] = 0;
  321.   SetPlayerPos(playerid,1958.33, 1343.12, 15.36);
  322.   SetPlayerCameraPos(playerid,1958.33, 1343.12, 15.36);
  323.   SetPlayerInterior(playerid,0);
  324.   GameTextForPlayer(playerid,"~y~Sloboda~n~~w~pokusajte biti bolji gradanin",4000,6);
  325. }
  326.  
  327. /***********************************KOMANDE************************************/
  328.  
  329. YCMD:makeadmin(playerid,params[], help) {
  330.    #pragma unused help
  331.    new
  332.        pid,
  333.        lvl,
  334.        str[128];
  335.    if(Podatci[playerid][Admin] == ADM_LVL_3) {
  336.    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]");
  337.    else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF0000}GREŠKA: {FFFFFF}Ovaj igrač nije na serveru!");
  338.    else if(lvl > 3 || lvl < 0) return SCM(playerid,-1,"{FF0000}GREŠKA: {FFFFFF}Možete koristiti samo Admin levele : 1,2,3 !");
  339.    else
  340.    Podatci[pid][Admin] = lvl;
  341.    format(str,sizeof str,"{00FF00}Admin {FFFFFF}%s vam je dao admin level {FFFFFF}%d !", GetName(playerid),lvl);
  342.    SCM(pid,-1,str); }
  343.    return true; }
  344.    
  345. YCMD:stats(playerid,params[], help) {
  346.    #pragma unused params
  347.    #pragma unused help
  348.    new stat[256];
  349.    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));
  350.    ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"** Vaša osobna iskaznica **",stat,"Spremi","");
  351.    return true; }
  352.    
  353. YCMD:clearchat(playerid, params[], help) {
  354.    #pragma unused params
  355.    #pragma unused help
  356.    new str[128];
  357.    if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  358.    foreach(Player,i) {
  359.    for(new c; c < 20; c++) SendClientMessage(i,-1,"  ");
  360.    format(str,sizeof str,"{00FF00}Admin %s je obrisao chat!", GetName(playerid));
  361.    SCMTA(-1,str); } }
  362.    return true; }
  363.    
  364. YCMD:setmoney(playerid,params[],help) {
  365.    #pragma unused help
  366.    new
  367.        pid,
  368.        val,
  369.        str[128];
  370.    if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  371.    if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTITE: /givemoney [id] [kolicina]");
  372.    else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"GREŠKA: Ovaj igrač nije na serveru!");
  373.    else if(val > 99999999 || val < 0) return SCM(playerid,-1,"GREŠKA: Koristite brojeve od 0 do 99999999!");
  374.    else
  375.    GivePlayerMoney(pid,val);
  376.    format(str,sizeof str,"{00FF00}Admin %s vam je dao nešto novaca : $%d",GetName(playerid),val);
  377.    SCM(pid,-1,str); }
  378.    return true; }
  379.  
  380. YCMD:setscore(playerid,params[],help) {
  381.    #pragma unused help
  382.    new
  383.         pid,
  384.         val,
  385.         str[128];
  386.    if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  387.    if(sscanf(params, "ud", pid,val)) return SendClientMessage(playerid,-1,"KORISTITE: /setscore [id] [kolicina]");
  388.    else if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"GREŠKA: Ovaj igrac nije na serveru!");
  389.    else if(val > 9999 || val < 0) return SCM(playerid,-1,"GREŠKA: Možete koristiti brojeve od 0 do 9999!");
  390.    else
  391.    SetPlayerScore(pid,GetPlayerScore(pid) + val);
  392.    format(str,sizeof str,"{00FF00}Admin %s ti je dao %d boda!",GetName(playerid),val);
  393.    SCM(pid,-1,str); }
  394.    return true; }
  395.    
  396. YCMD:givewarn(playerid,params[],help) {
  397.    #pragma unused help
  398.    new
  399.         pid,
  400.         val,
  401.         reason[128],
  402.         str[128];
  403.    if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  404.    if(sscanf(params, "us[128]d", pid, reason, val)) return SendClientMessage(playerid, -1, "KORISTI: /givewarn [id] [razlog] [kolicina]");
  405.    else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF0000}GREŠKA: Ovaj igrač nije na serveru!");
  406.    else if(val < 0 || val > 3) return SCM(playerid,-1,"{FF0000}GREŠKA: Možete koristiti brojeve od 0 do 3!");
  407.    else
  408.    Podatci[pid][Warns] = Podatci[pid][Warns] + val;
  409.    format(str,sizeof str,"{00FF00}Admin %s vam je dao %d warninga! Razlog : %s", GetName(playerid),val,reason);
  410.    SCM(pid,-1,str); }
  411.    if(Podatci[pid][Warns] >= 3)
  412.    {
  413.      new
  414.           str2[128],
  415.           str3[128];
  416.      format(str2,sizeof str2,"{FF0000}[SERVER] %s je dobio ban od admina %s! Razlog : 3 Warna!", GetName(pid),GetName(playerid));
  417.      SCMTA(-1,str2);
  418.      format(str3,sizeof str3,"{FF0000}[SERVER] Banani ste od strane Admina %s! Razlog : 3 Warna!", GetName(playerid));
  419.      SCM(pid,-1,str3);
  420.      SCM(pid,-1,"{00FFFF}Ukoliko mislite da ste krivo banani , molimo vas pratite sljedece upute :");
  421.      SCM(pid,-1,"{FF0000}--------------------------------------------------------------------------");
  422.      SCM(pid,-1,"{00FFFF}Odite na naš forum (www.forum.com) i otvorite temu u određenom pdf-u");
  423.      SetPlayerPos(playerid,5,5,5);
  424.      SetPlayerCameraPos(playerid, 5,5,35);
  425.      SetPlayerCameraLookAt(playerid, 5,5,35);
  426.      Ban(pid);
  427.    }
  428.    return true; }
  429.    
  430. YCMD:help(playerid,params[],help) {
  431.     #pragma unused help
  432.     #pragma unused params
  433.     new
  434.           str[256];
  435.     strcat(str,"\n/stats | /pm | /togpm | /new | /report");
  436.     strcat(str,"\n/pay | /eject | /admins | /kill");
  437.     ShowPlayerDialog(playerid,KOMANDE,DIALOG_STYLE_MSGBOX,"[SERVER KOMANDE]",str,"Zatvori","");
  438.     return true; }
  439.    
  440. YCMD:gmx(playerid,params[],help) { /*custom*/
  441.     #pragma unused params
  442.     #pragma unused help
  443.     if(Podatci[playerid][Admin] == ADM_LVL_3) {
  444.     GameTextForAll("GMX",11000,6);
  445.     foreach(Player, i) {
  446.     new
  447.          stra[256];
  448.     format(stra,sizeof stra,"/mIgraci/%s.ini",GetName(playerid));
  449.     new
  450.             INI:dat = INI_Open(stra);
  451.     INI_SetTag(dat,"data");
  452.     INI_WriteInt(dat,"Novac",GetPlayerMoney(i));
  453.     INI_WriteInt(dat,"Score",GetPlayerScore(i));
  454.     INI_WriteInt(dat,"Admin",Podatci[i][Admin]);
  455.     INI_WriteInt(dat,"Warns",Podatci[i][Warns]);
  456.     INI_WriteInt(dat,"Skin",GetPlayerSkin(i));
  457.     INI_Close(dat);
  458.     SendRconCommand("gmx"); } }
  459.     return true; }
  460.    
  461. YCMD:veh(playerid,params[],help) {
  462.     #pragma unused help
  463.     new
  464.          vehid,
  465.          restime,
  466.          Float:Pos[4];
  467.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  468.     if(sscanf(params, "ii", vehid,restime)) return SCM(playerid,-1,"KORISTITE: /veh [car id] [respawn time]");
  469.     if(vehid < 400 || vehid > 611) return SCM(playerid,-1,"GREŠKA: Odaberite ID vozila između 400 i 611!");
  470.     else
  471.     GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  472.     CreateVehicle(vehid,Pos[0]+3,Pos[1],Pos[2],Pos[3],random(126),random(126),restime);
  473.     SCM(playerid,-1,"{00FF00}Uspješno ste stvorili vozilo!"); }
  474.     return true; }
  475.    
  476. YCMD:mute(playerid,params[],help) {
  477.     #pragma unused help
  478.     new
  479.          pid,
  480.          vr,
  481.          razlog[128],
  482.          str[128];
  483.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  484.     if(sscanf(params, "uis[128]", pid,vr,razlog)) return SCM(playerid,-1,"KORISTITE: /mute [id] [vrijeme mutea (u sekundama)] [razlog]");
  485.     if(Podatci[playerid][Mutean] == 1) return SCM(playerid,-1,"Taj je igrač već mutean!");
  486.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  487.     MutedVrijeme[pid] = SetTimerEx("Muted", vr*1000, 0, "d", pid);
  488.     Podatci[pid][Mutean] = 1;
  489.     format(str,sizeof str,"{00FF00}Muteani ste od strane admina %s na %d sekundi! Razlog : %s!", GetName(playerid),vr,razlog);
  490.     SCM(pid,-1,str); }
  491.     return true; }
  492.    
  493. YCMD:unmute(playerid,params[],help) {
  494.     #pragma unused help
  495.     new
  496.         pid,
  497.         str[128];
  498.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  499.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unmute [id]");
  500.     if(Podatci[playerid][Mutean] == 0) return SCM(playerid,-1,"Taj igrač nije mutean!");
  501.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  502.     else
  503.     KillTimer(MutedVrijeme[pid]);
  504.     Podatci[pid][Mutean] = 0;
  505.     format(str,sizeof str,"{00FF00}Admin %s vas je odmuteao! Sada možete pričati!", GetName(playerid));
  506.     SCM(pid,-1,str); }
  507.     return true; }
  508.    
  509. YCMD:freeze(playerid,params[],help) {
  510.     #pragma unused help
  511.     new
  512.          pid,
  513.          vr,
  514.          razlog[128],
  515.          str[128];
  516.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  517.     if(sscanf(params, "uis[128]", pid,vr,razlog)) return SCM(playerid,-1,"KORISTITE: /freeze [id] [vrijeme freezea (u sekundama)] [razlog]");
  518.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Taj igrač je već zaleđen!");
  519.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  520.     FreezeVrijeme[pid] = SetTimerEx("Freezan", vr*1000, 0, "d", pid);
  521.     rBit1_Set(Freezed,pid,1);
  522.     format(str,sizeof str,"{00FF00}Zaleđeni ste od strane admina %s na %d sekundi! Razlog : %s!", GetName(playerid),vr,razlog);
  523.     SCM(pid,-1,str); }
  524.     return true; }
  525.    
  526. YCMD:unfreeze(playerid,params[],help) {
  527.     #pragma unused help
  528.     new
  529.         pid,
  530.         str[128];
  531.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  532.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unmute [id]");
  533.     if(!rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Taj igrač nije zaleđen!");
  534.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  535.     else
  536.     KillTimer(FreezeVrijeme[pid]);
  537.     rBit1_Set(Freezed,playerid,0);
  538.     format(str,sizeof str,"Admin %s vas je odledio!", GetName(playerid));
  539.     SCM(pid,-1,str); }
  540.     return true; }
  541.    
  542. YCMD:sethp(playerid,params[],help) {
  543.     #pragma unused help
  544.     new
  545.          pid,
  546.          val,
  547.          str[128];
  548.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  549.     if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTI: /sethp [id] [kolicina]");
  550.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
  551.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
  552.     if(val > 100 || val < 0) return SCM(playerid,-1,"{FF8000}Možete koristiti samo brojeve od 0 do 100!");
  553.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF8000}Taj igrač nije na serveru!");
  554.     else
  555.     SetPlayerHealth(pid,val);
  556.     format(str,sizeof str, "{00FF00}Admin %s vam je dao %d% healtha!", GetName(playerid),val);
  557.     SCM(pid,-1,str); }
  558.     return true; }
  559.    
  560. YCMD:setarmor(playerid,params[],help) {
  561.     #pragma unused help
  562.     new
  563.          pid,
  564.          val,
  565.          str[128];
  566.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  567.     if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTI: /setarmor [id] [kolicina]");
  568.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
  569.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
  570.     if(val > 100 || val < -1) return SCM(playerid,-1,"Možete koristiti samo brojeve od 0 do 100!");
  571.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  572.     else
  573.     SetPlayerArmour(pid,val);
  574.     format(str,sizeof str, "Admin %s vam je dao %d% armora!", GetName(playerid),val);
  575.     SCM(pid,-1,str); }
  576.     return true; }
  577.    
  578. YCMD:pm(playerid,params[],help) {
  579.     #pragma unused help
  580.     new
  581.          pid,
  582.          poruka[128],
  583.          str[128];
  584.     if(sscanf(params, "us[128]", pid,poruka)) return SCM(playerid,-1,"KORISTITE: /pm [id] [poruka]");
  585.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu na tom igraču zato što je u zatvoru!");
  586.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"{FF8000}Nemožete poslati poruku tom igraču zato što je zaleđen!");
  587.     if(Podatci[playerid][Mutean] == 1) return SCM(playerid,-1,"Nemožete slati tom igraču poruke zato što je mutean!");
  588.     if(rBit1_Get(togglepm,pid)) return SCM(playerid,-1,"{FF8000}Nemožete poslati poruku tom igraču zato što je ugasio mobitel!");
  589.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"{FF8000}Taj igrač nije na serveru!");
  590.     else
  591.     format(str,sizeof str,"{FF8000}%s vam je poslao poruku : %s",GetName(playerid),poruka);
  592.     SCM(pid,-1,str);
  593.     SCM(playerid,-1,str);
  594.     GameTextForPlayer(pid,"Nova poruka",4000,6);
  595.     return true; }
  596.    
  597. YCMD:togpm(playerid,params[],help) {
  598.     #pragma unused help
  599.     new
  600.         toggledpm;
  601.     if(sscanf(params, "i", toggledpm)) return SCM(playerid, -1,"KORISTI: /togpm (0 - ne , 1 - da");
  602.     if(rBit1_Get(Freezed,playerid)) return SCM(playerid,-1,"{00FFFF}Nemožete koristiti ovu poruku dok ste zaleđeni!");
  603.     if(Podatci[playerid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete koristiti ovu komandu dok ste u zatvoru!");
  604.     switch(toggledpm)
  605.     {
  606.         case 0:
  607.         {
  608.            if(!rBit1_Get(togglepm, playerid)) return SCM(playerid,-1,"{00FFFF}Nemate isključeno primanje privatnih poruka!");
  609.            else
  610.            rBit1_Set(togglepm,playerid,0);
  611.            SCM(playerid,-1,"{00FF00}Uključili ste primanje privatnih poruka!");
  612.         }
  613.         case 1:
  614.         {
  615.            if(rBit1_Get(togglepm,playerid)) return SCM(playerid,-1,"{00FFFF}Već imate isključeno primanje privatnih poruka!");
  616.            else
  617.            rBit1_Set(togglepm,playerid,1);
  618.            SCM(playerid,-1,"{00FF00}Isključili ste primanje privatnih poruka!"); } }
  619.     return true; }
  620.  
  621. YCMD:new(playerid,params[],help) {
  622.      #pragma unused help
  623.      new
  624.          helpmsg[128],
  625.          strg[128];
  626.      if(sscanf(params, "s[128]", helpmsg)) return SCM(playerid,-1,"{00FFFF}KORISTITE: /new [poruka adminima]");
  627.      format(strg,sizeof strg,"{00FFFF}%s šalje poruku adminima : {FFFFFF}%s", GetName(playerid),helpmsg);
  628.      AdminPoruka(-1,strg);
  629.      SCM(playerid,-1,"Vaš zahtjev za pomoć je poslan svim slobodnim adminima");
  630.      return true; }
  631.    
  632. YCMD:report(playerid,params[],help) {
  633.      #pragma unused help
  634.      new
  635.           pid,
  636.           reportmsg[128],
  637.           str[128],
  638.           str1[128];
  639.      if(sscanf(params,"us[128]", pid,reportmsg)) return SCM(playerid,0xFF80009E,"KORISTITE: /report [id] [razlog]");
  640.      else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
  641.      else
  642.      format(str,sizeof str,"Igrač %s prijavljuje igrača %s! Razlog : %s", GetName(playerid),GetName(pid),reportmsg);
  643.      AdminPoruka(0x00FFFF9E,str);
  644.      format(str1,sizeof str1,"Prijavili ste igrača %s adminima!", GetName(pid));
  645.      SCM(playerid,0x00FFFF9E,str1);
  646.      return true; }
  647.  
  648. YCMD:check(playerid,params[],help) {
  649.     #pragma unused help
  650.     new
  651.          pid,
  652.          checkstr[256],
  653.          str[128];
  654.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  655.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /check [id]");
  656.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
  657.     else
  658.     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));
  659.     ShowPlayerDialog(playerid,CHECK,DIALOG_STYLE_MSGBOX,"{FFFF00}** Administrativni pregled iskaznice **",checkstr,"Zatvori","");
  660.     format(str,sizeof str,"Pregledavate osobnu iskaznicu igrača %s!",GetName(pid));
  661.     SCM(playerid,-1,str); }
  662.     return true; }
  663.  
  664. YCMD:setskin(playerid,params[],help) {
  665.     #pragma unused help
  666.     new
  667.          pid,
  668.          skinid,
  669.          str[128],
  670.          str2[128];
  671.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  672.     if(sscanf(params, "ud", pid,skinid)) return SCM(playerid,-1,"KORISTITE: /setskin [id] [skin id]");
  673.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,0xFF80009E,"Nemožete koristiti ovu komandu na tom igraču zato što je zaleđen!");
  674.     if(skinid > 299 || skinid < 0) return SCM(playerid,0xFF80009E,"Možete koristiti samo brojeve između 0 i 299!");
  675.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,0xFF80009E,"Taj igrač nije na serveru!");
  676.     else
  677.     SetPlayerSkin(pid,skinid);
  678.     format(str,sizeof str,"Admin %s vam je promjenio skin u skin id : %d!",GetName(playerid),skinid);
  679.     SCM(pid,-1,str);
  680.     format(str2,sizeof str2,"Promjenili ste %s-u skin u skin id : %d!",GetName(pid),skinid);
  681.     SCM(playerid,-1,str2); }
  682.     return true; }
  683.    
  684. YCMD:playsong(playerid,params[],help) {
  685.     #pragma unused help
  686.     #pragma unused params
  687.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  688.     ShowPlayerDialog(playerid,PJESMAZAMENE,DIALOG_STYLE_INPUT,"{FF8000}[SERVER RADIO]","{FF8000}Unesite link pjesme koju će te pustit samo sebi!","On","Off"); }
  689.     return true; }
  690.  
  691. YCMD:playsong4all(playerid,params[],help) {
  692.     #pragma unused help
  693.     #pragma unused params
  694.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  695.     ShowPlayerDialog(playerid,PJESMAZASVE,DIALOG_STYLE_INPUT,"{FF8000}[SERVER RADIO]","{FF8000}Unesite link pjesme koju će te pustit svima!","On","Off"); }
  696.     return true; }
  697.    
  698. YCMD:ban(playerid,params[],help) {
  699.     #pragma unused help
  700.     new
  701.          pid,
  702.          razlog[128],
  703.          str[128];
  704.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  705.     if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /ban [id] [razlog");
  706.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  707.     else
  708.     format(str,sizeof str,"[SERVER] Admin %s je protjerao(banao) %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
  709.     SCMTA(0xFF80009E,str);
  710.     GameTextForPlayer(pid,"Banned",3000,6);
  711.     SCM(pid,-1,"{00FFFF}Ukoliko mislite da ste krivo banani , molimo vas pratite sljedece upute :");
  712.     SCM(pid,-1,"{FF0000}Otiđite na naš forum (www.tvojforum.com) i otvorite temu u određenom pdf-u!");
  713.     SetPlayerPos(playerid,5,5,5);
  714.     SetPlayerCameraPos(playerid, 5,5,35);
  715.     SetPlayerCameraLookAt(playerid, 5,5,35);
  716.     Ban(pid); }
  717.     return true; }
  718.  
  719. YCMD:kick(playerid,params[],help) {
  720.     #pragma unused help
  721.     new
  722.          pid,
  723.          razlog[128],
  724.          str[128];
  725.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  726.     if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /kick [id] [razlog]");
  727.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  728.     else
  729.     format(str,sizeof str,"[SERVER] Admin %s je kickao %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
  730.     SCMTA(0xFF80009E,str);
  731.     GameTextForPlayer(pid,"Kicked",3000,6);
  732.     SetPlayerPos(playerid,5,5,5);
  733.     SetPlayerCameraPos(playerid, 5,5,35);
  734.     SetPlayerCameraLookAt(playerid, 5,5,35);
  735.     Kick(pid); }
  736.     return true; }
  737.  
  738. YCMD:fban(playerid,params[],help) {
  739.     #pragma unused help
  740.     new
  741.          pid,
  742.          razlog[128],
  743.          str[128];
  744.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  745.     if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /fban [id] [razlog");
  746.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  747.     else
  748.     format(str,sizeof str,"[SERVER] Admin %s je protjerao(banao) %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
  749.     SCMTA(-1,str);
  750.     SCM(pid,-1,"Nemoj se uplašiti , ovo je samo fake ban :)"); }
  751.     return true; }
  752.    
  753. YCMD:fkick(playerid,params[],help) {
  754.     #pragma unused help
  755.     new
  756.          pid,
  757.          razlog[128],
  758.          str[128];
  759.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  760.     if(sscanf(params, "us[128]", pid,razlog)) return SCM(playerid,-1,"KORISTITE: /fkick [id] [razlog]");
  761.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  762.     else
  763.     format(str,sizeof str,"[SERVER] Admin %s je kickao %s-a sa servera! Razlog : %s",GetName(playerid),GetName(pid),razlog);
  764.     SCMTA(-1,str);
  765.     SCM(pid,-1,"Nemoj se uplašiti , ovo je samo fake kick :)"); }
  766.     return true; }
  767.    
  768. YCMD:gethere(playerid,params[],help) {
  769.     #pragma unused help
  770.     new
  771.          pid,
  772.          Float:Pos[4],
  773.          str[128];
  774.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  775.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /gethere [id]");
  776.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete portati tog igrača zato što je u zatvoru!");
  777.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  778.     else
  779.     GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  780.     SetPlayerPos(pid,Pos[0]+1,Pos[1],Pos[2]);
  781.     format(str,sizeof str,"Teleportirani ste do admina %s!",GetName(playerid));
  782.     SCM(pid,-1,str); }
  783.     return true; }
  784.    
  785. YCMD:goto(playerid,params[],help) {
  786.     #pragma unused help
  787.     new
  788.          pid,
  789.          Float:Pos[4],
  790.          str[128],
  791.          str2[128];
  792.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  793.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /goto [id]");
  794.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"{FF8000}Nemožete portati tog igrača zato što je u zatvoru!");
  795.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  796.     else
  797.     GetPlayerPos(pid,Pos[0],Pos[1],Pos[2]);
  798.     SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
  799.     format(str,sizeof str,"Admin %s se teleportirao do vas!",GetName(playerid));
  800.     SCM(pid,-1,str);
  801.     format(str2,sizeof str2,"Teleportirali ste se do %-a!", GetName(pid));
  802.     SCM(playerid,-1,str2); }
  803.     return true; }
  804.  
  805. YCMD:settime(playerid,params[],help) {
  806.     #pragma unused help
  807.     new
  808.          vrbroj,
  809.          str[128];
  810.     if(Podatci[playerid][Admin] == ADM_LVL_3) {
  811.     if(sscanf(params, "d", vrbroj)) return SCM(playerid,-1,"KORISTITE: /settime [0-23]");
  812.     SetWorldTime(vrbroj);
  813.     format(str,sizeof str,"Pomaknili ste sat na %d!",vrbroj);
  814.     SCM(playerid,-1,str); }
  815.     return true; }
  816.    
  817. YCMD:jail(playerid,params[],help) {
  818.     #pragma unused help
  819.     new
  820.           pid,
  821.           time,
  822.           razlog[128],
  823.           str[128];
  824.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  825.     if(sscanf(params, "uis[128]", pid,time,razlog)) return SCM(playerid,-1,"KORISTITE: /jail [id] [vrijeme (u sekundama)] [razlog]");
  826.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Taj igač je već zatvoren!");
  827.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  828.     else
  829.     JailedVrijeme[pid] = SetTimerEx("Jailan", time*1000, 0, "d", pid);
  830.     Podatci[pid][Zatvoren] = 1;
  831.     ResetPlayerWeapons(pid);
  832.     SetPlayerInterior(pid,6);
  833.     SetPlayerPos(pid,264.1759,77.7382,1001.0391);
  834.     SetPlayerCameraPos(pid,264.1759,77.7382,1001.0391);
  835.     format(str,sizeof str,"Admin %s vas je zatvorio na %d sekundi! Razlog : %s",GetName(playerid),time,razlog);
  836.     SCM(pid,-1,str);
  837.     SCM(playerid,-1,"Uspješno ste zatvorili igrača!"); }
  838.     return true; }
  839.    
  840. YCMD:unjail(playerid,params[],help) {
  841.     #pragma unused help
  842.     new
  843.          pid,
  844.          str[128];
  845.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  846.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /unjail [id]");
  847.     if(Podatci[pid][Zatvoren] == 0) return SCM(playerid,-1,"Taj igrač nije zatvoren!");
  848.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  849.     else
  850.     KillTimer(JailedVrijeme[pid]);
  851.     Podatci[pid][Zatvoren] = 0;
  852.     SetPlayerPos(pid,1958.33, 1343.12, 15.36);
  853.     SetPlayerCameraPos(pid,1958.33, 1343.12, 15.36);
  854.     SetPlayerInterior(pid,0);
  855.     format(str,sizeof str,"Admin %s vas je unjailao!", GetName(playerid));
  856.     SCM(pid,-1,str);
  857.     GameTextForPlayer(pid,"~y~Sloboda~n~~w~pokusajte biti bolji gradanin",4000,6);
  858.     SCM(playerid,-1,"Uspješno ste unjailali igrača!"); }
  859.     return true; }
  860.    
  861. YCMD:pay(playerid,params[],help) {
  862.     #pragma unused help
  863.     new
  864.          pid,
  865.          val,
  866.          str[128],
  867.          str2[128];
  868.     if(sscanf(params, "ud", pid,val)) return SCM(playerid,-1,"KORISTITE: /pay [id] [kolicina]");
  869.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati novce tom igraču zato što je u zatvoru!");
  870.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete davati novce igraču koji je zaleđen!");
  871.     if(Podatci[playerid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati novce zato što ste u zatvoru!");
  872.     if(rBit1_Get(Freezed,playerid)) return SCM(playerid,-1,"Nemožete davati novce zato što ste zaleđeni!");
  873.     if(val > GetPlayerMoney(playerid)) return SCM(playerid,-1,"Nemate toliko novaca! Odaberite drugu valutu!");
  874.     if(val < 0 || val > 99999999) return SCM(playerid,-1,"Možete davati novce između $0 i $99999999");
  875.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  876.     else
  877.     GivePlayerMoney(pid,val);
  878.     format(str,sizeof str,"Igrač %s vam je dao $%d!",GetName(playerid),val);
  879.     SCM(pid,-1,str);
  880.     format(str2,sizeof str2,"Igrač %s je dao igraču %s $%d!",GetName(playerid),GetName(pid),val);
  881.     AdminPoruka(-1,str2);
  882.     return true; }
  883.    
  884. YCMD:specon(playerid, params[],help) {
  885.     #pragma unused help
  886.     new
  887.           pid,
  888.           str[128];
  889.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  890.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /specon [id]");
  891.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  892.     else
  893.     format(str,sizeof str,"Počeli ste spectat igrača %s!",GetName(pid));
  894.     SCM(playerid,-1,str);
  895.     TogglePlayerSpectating(playerid, 1);
  896.     SetPlayerInterior(playerid, GetPlayerInterior(pid));
  897.     PlayerSpectatePlayer(playerid, pid, 1);
  898.     rBit1_Set(Specting,playerid,1); }
  899.     return true; }
  900.  
  901. YCMD:specoff(playerid,params[],help) {
  902.     #pragma unused help
  903.     #pragma unused params
  904.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  905.     if(!rBit1_Get(Specting,playerid)) return SCM(playerid,0x00FF409E,"Nikoga nespectate!");
  906.     rBit1_Set(Specting,playerid,0);
  907.     SCM(playerid,0x00FF009E,"Prestali ste spectat igrača!");
  908.     TogglePlayerSpectating(playerid,0); }
  909.     return true; }
  910.  
  911. YCMD:eject(playerid,params[],help) {
  912.     #pragma unused help
  913.     new
  914.           vID,
  915.           pid,
  916.           pstate = GetPlayerState(playerid),
  917.           str[128],
  918.           str2[128];
  919.     if(sscanf(params, "u", pid)) return SCM(playerid,-1,"KORISTITE: /eject [id]");
  920.     if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,"Niste u vozilu!");
  921.     if(pstate == PLAYER_STATE_PASSENGER) return SCM(playerid,-1,"Samo vozači mogu koristiti ovu komandu!");
  922.     vID = GetPlayerVehicleID(playerid);
  923.     if(!IsPlayerInVehicle(pid,vID)) return SCM(playerid,-1,"Taj igrač nije u vašem vozilu!");
  924.     else
  925.     RemovePlayerFromVehicle(pid);
  926.     format(str,sizeof str,"Igrač %s vas je izbacio iz vozila!", GetName(playerid));
  927.     SCM(pid,-1,str);
  928.     format(str2,sizeof str2,"Izbacili ste %s-a iz vašeg vozila!", GetName(pid));
  929.     SCM(playerid,-1,str2);
  930.     return true; }
  931.    
  932. YCMD:admini(playerid, params[], help) {
  933.     #pragma unused help
  934.     #pragma unused params
  935.     new str[256];
  936.     SCM(playerid,0x00FF409E,"|____________ONLINE ADMINI____________|");
  937.     foreach(Player, i)
  938.     if(Podatci[i][Admin] == ADM_LVL_3) {
  939.     format(str, sizeof(str), "{FFFFFF}ADMIN LEVEL 3 | {FFFFFF}%s", GetName(i));
  940.     SCM(playerid,-1,str); }
  941.     else if(Podatci[i][Admin] == ADM_LVL_2) {
  942.     format(str, sizeof(str), "{FFFFFF}ADMIN LEVEL 2 | {FFFFFF}%s", GetName(i));
  943.     SCM(playerid,-1,str); }
  944.     else if(Podatci[i][Admin] == GAMEMASTER) {
  945.     format(str, sizeof(str), "{FFFFFF}GAMEMASTER | {FFFFFF}%s", GetName(i));
  946.     SCM(playerid,-1,str); }
  947.     SCM(playerid,0x00FF409E,"|____________ONLINE ADMINI____________|");
  948.     return true; }
  949.  
  950. YCMD:a(playerid, params[], help) {
  951.     #pragma unused help
  952.     new
  953.          strt[128],
  954.          str[128];
  955.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  956.     if(sscanf(params, "s[128]", strt)) return SCM(playerid,-1, "KORISTI: /a [admin chat poruka]");
  957.     if(Podatci[playerid][Admin] == ADM_LVL_3) {
  958.     format(str, sizeof(str), "{FFFF00}Admin Lvl 3 %s: {FFFFFF}%s", GetName(playerid), strt); }
  959.     if(Podatci[playerid][Admin] == ADM_LVL_2) {
  960.     format(str, sizeof(str), "{FFFF00}Admin Lvl 2 %s: {FFFFFF}%s", GetName(playerid), strt); }
  961.     if(Podatci[playerid][Admin] == GAMEMASTER) {
  962.     format(str, sizeof(str), "{FFFF00}Gamemaster %s: {FFFFFF}%s", GetName(playerid), strt); }
  963.     AdminPoruka(-1,str); }
  964.     return true; }
  965.    
  966. YCMD:ann(playerid,params[],help) {
  967.     #pragma unused help
  968.     new
  969.          anntekst[128],
  970.          str[128];
  971.     if(Podatci[playerid][Admin] == ADM_LVL_3) {
  972.     if(sscanf(params, "s[128]", anntekst)) return SCM(playerid,-1,"KORISTITE: /ann [tekst]");
  973.     format(str,sizeof str,"%s : %s", GetName(playerid),anntekst);
  974.     GameTextForAll(str,3000,6); }
  975.     return true; }
  976.    
  977. YCMD:giveweapon(playerid,params[],help) {
  978.     #pragma unused help
  979.     new
  980.           pid,
  981.           gunid,
  982.           ammo,
  983.           str[128],
  984.           str2[128];
  985.     if(Podatci[playerid][Admin] >= ADM_LVL_2) {
  986.     if(sscanf(params, "udd", pid,gunid,ammo)) return SCM(playerid,-1,"KORISTITE: /giveweapon [id] [oruzje id] [kolicina]");
  987.     if(Podatci[pid][Zatvoren] == 1) return SCM(playerid,-1,"Nemožete davati oružje tom igraču zato što je u zatvoru!");
  988.     if(rBit1_Get(Freezed,pid)) return SCM(playerid,-1,"Nemožete ovom igraču dat oružje zato što je zaleđen!");
  989.     else if(pid == INVALID_PLAYER_ID) return SCM(playerid,-1,"Taj igrač nije na serveru!");
  990.     else
  991.     GivePlayerWeapon(playerid, gunid, ammo);
  992.     format(str,sizeof str,"Admin %s vam je dao oružje id %d i %d metaka!", GetName(playerid),gunid,ammo);
  993.     SCM(pid,-1,str);
  994.     format(str2,sizeof str2,"Dali ste igraču %s oružje!", GetName(pid));
  995.     SCM(playerid,-1,str); }
  996.     return true; }
  997.  
  998. YCMD:kill(playerid,params[],help) {
  999.     #pragma unused help
  1000.     #pragma unused params
  1001.     SetPlayerHealth(playerid, -1);
  1002.     SCM(playerid,-1,"Počinili ste samoubojstvo!");
  1003.     return true; }
  1004.    
  1005. YCMD:ahelp(playerid,params[],help) {
  1006.     #pragma unused help
  1007.     #pragma unused params
  1008.     new
  1009.           str[860];
  1010.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  1011.     strcat(str,"\n{80FFFF}GAMEMASTER KOMANDE :");
  1012.     strcat(str,"\n{FFFFFF}/ban | /kick | /fkick | /fban | /goto | /gethere | /specon | /specoff | /achat | /aonduty | /aoffduty");
  1013.     strcat(str,"\n\n{80FFFF}ADMIN LEVEL 2 KOMANDE :");
  1014.     strcat(str,"\n{FFFFFF}/setarmor | /sethp | /freeze | /unfreeze | /mute | /unmute | /veh | /aonduty | /aoffduty");
  1015.     strcat(str,"\n{FFFFFF}/givewarn | /setscore | /setmoney | /clearchat | /check | /setskin");
  1016.     strcat(str,"\n{FFFFFF}/playsong | /playsong4all | /ban | /kick | /fban | /fkick | /settime");
  1017.     strcat(str,"\n{FFFFFF}/goto | /gethere | /jail | /unjail | /specon | specoff | /achat | /ann | /giveweapon");
  1018.     strcat(str,"\n\n{80FFFF}ADMIN LEVEL 3 KOMANDE :");
  1019.     strcat(str,"\n{FFFFFF}/ban | /kick | /fkick | /fban | /goto | /gethere | /specon | /specoff | /achat");
  1020.     strcat(str,"\n{FFFFFF}/setarmor | /sethp | /freeze | /unfreeze | /mute | /unmute | /veh");
  1021.     strcat(str,"\n{FFFFFF}/givewarn | /setscore | /setmoney | /clearchat | /check | /setskin");
  1022.     strcat(str,"\n{FFFFFF}/playsong | /playsong4all | /settime | /aonduty | /aoffduty");
  1023.     ShowPlayerDialog(playerid,ADMKOMANDE,DIALOG_STYLE_MSGBOX,"{80FFFF}[ADMIN KOMANDE]",str,"Zatvori",""); }
  1024.     return true; }
  1025.  
  1026. YCMD:adutyon(playerid,params[],help) {
  1027.     #pragma unused help
  1028.     #pragma unused params
  1029.     new
  1030.           str[128];
  1031.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  1032.     if(GetPVarInt(playerid,"onDuty") == 1) return SCM(playerid,0x33AA33AA,"Već ste na dužnosti!");
  1033.     SetPVarInt(playerid,"onDuty",1);
  1034.     format(str,sizeof str,"Admin %s je sada na dužnosti!", GetName(playerid));
  1035.     SCMTA(-1,str);
  1036.     SetPlayerHealth(playerid,999);
  1037.     SetPlayerArmour(playerid,999);
  1038.     SetPlayerColor(playerid,0x33AA33AA); }
  1039.     return true; }
  1040.  
  1041. YCMD:adutyoff(playerid,params[],help) {
  1042.     #pragma unused help
  1043.     #pragma unused params
  1044.     new
  1045.          str[128];
  1046.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  1047.     if(GetPVarInt(playerid,"onDuty") == 0) return SCM(playerid,-1,"Vi niste na dužnosti!");
  1048.     SetPVarInt(playerid,"onDuty", 0);
  1049.     SCM(playerid,-1,"Više niste na dužnosti!");
  1050.     SetPlayerHealth(playerid,100);
  1051.     SetPlayerArmour(playerid,0);
  1052.     format(str,sizeof str,"Admin %s više nije na dužnosti!",GetName(playerid));
  1053.     SetPlayerColor(playerid,-1);
  1054.     SCMTA(-1,str); }
  1055.     return true; }
  1056.    
  1057. YCMD:gotopick(playerid, params[],help) {
  1058.     #pragma unused help
  1059.     #pragma unused params
  1060.     if(Podatci[playerid][Admin] >= GAMEMASTER) {
  1061.     ShowPlayerDialog(playerid,GOTO,DIALOG_STYLE_LIST,"[GOTO ODABERI]","Los Santos\nSan Fierro\nLas Venturas","Odaberi","Odustani"); }
  1062.     return true; }
  1063.  
  1064.  
  1065.  
  1066.  
  1067. /*******************************************************************************
  1068. EOS
  1069.  
  1070. Skripta napravljena 13.11.2011
  1071.  
  1072. Credits :
  1073.  
  1074. Matt - napravio cijelu skriptu
  1075. Y_Less - ycmd & y_ini
  1076. RyDeR - rBits
  1077. DracoBlue - udb hasher
  1078. System32
  1079.  
  1080. Nemate pravo :
  1081.  
  1082. Uzimati ovu skriptu te je predstavljati kao svoju!
  1083. Prodavati je prethodno bez moje dozvole!
  1084. *******************************************************************************/
  1085.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement