Szerző Téma: Admin Rendszer! Hiba!  (Megtekintve 484 alkalommal)

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Admin Rendszer! Hiba!
« Dátum: 2012. július 07. - 09:29:21 »
0 Show voters
Üdv, készítettem egy admin rendszert de nem jó nem tudom miért! A streamert plugin betöltve a konzol nem ír ki semmit és mikor berakom egyáltalán nem csinál semmit még a parancsokat sem észleli és a dialog sem jelenik meg. A parancsokat a netrõl szetem de átalakitottam és dialogosan átrítam de nem megyen. Valaki tudna segíteni ha igen kérem javítsa ki! A szkript hibátlan!
 

//Include
#include <a_samp>
#include <dini>
#include <dudb>
#include <streamer>
#include <fixchars>
#include <zcmd>
#define DIALOG_LOGIN 1
#define DIALOG_REGISTER1 2
#pragma tabsize 0
//Forward
forward SaveIn(filename[],text[]);
forward ServerBot();
forward God(playerid);
forward SetPlayerPosTravelTimer(playerid, Float:x, Float:y, Float:z);
forward unfreezetimer(playerid);
native WP_Hash(buffer[], len, const str[]);
//játékosok
#undef MAX_PLAYERS
#define MAX_PLAYERS 30
//spec
#define Loop(%1,%2) \\
    for(new %1=0; %1<%2; %1++)
//színek.
#define GREY 0xAFAFAFAA
#define GREEN 0x33AA33AA
#define YELLOW 0xFFFF00AA
#define LIGHTBLUE 0x33CCFFAA
#define ORANGE 0xFF9900AA
#define WHITE 0xFFFFFFAA
#define TRAVEL_TIME 20 // sec
public unfreezetimer(playerid)
{
    TogglePlayerControllable(playerid, 1);
    GameTextForPlayer(playerid, \"Objectek Betöltve!\", 1000, 6);
    return true;
}
public SetPlayerPosTravelTimer(playerid, Float:x, Float:y, Float:z)
{
    TogglePlayerControllable(playerid, false);
    GameTextForPlayer(playerid, \"Objectek ~r~Betöltése..\", 3000, 6);
    SetTimerEx(\"unfreezetimer\",3000,0,\"d\",playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, x, y, z);
    GameTextForPlayer(playerid, \"Traveling over\", 3000, 1);
    return true;
}
stock SetPlayerPosTravel(playerid, Float:x, Float:y, Float:z)
{
    TogglePlayerControllable(playerid, false);
    GameTextForPlayer(playerid, \"Traveling\", 3000, 1);
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid, 1.7313,27.1232,1199.5938);
    SetTimerEx(\"SetPlayerPosTravelTimer\", TRAVEL_TIME*1000, 0, \"ifff\", playerid, x, y, z);
    return 1;
}
public OnFilterScriptInit()
{
SetTimer(\"ServerBot\", 15*1000, 1);
CreateDynamicObject(9931, 369.681640625, 2339.9267578125, 1904.9915771484, 0, 0, 0);
CreateDynamicObject(9931, 369.7060546875, 2308.431640625, 1904.9920654297, 0, 0, 0);
CreateDynamicObject(6959, 380.3193359375, 2327.4951171875, 1888.5981445313, 0, 0, 0);
CreateDynamicObject(6959, 378.1806640625, 2333.775390625, 1897.5466308594, 296.47705078125, 0, 0);
CreateDynamicObject(6959, 378.0703125, 2314.8393554688, 1897.5084228516, 63.740020751953, 0, 0);
CreateDynamicObject(6959, 363.0498046875, 2326.4736328125, 1902.5007324219, 0, 270.18676757813, 0);
CreateDynamicObject(9931, 409.28952026367, 2325.361328125, 1903.9514160156, 0, 0, 182.88500976563);
CreateDynamicObject(6959, 349.35693359375, 2328.1083984375, 1889.6359863281, 0, 0, 0);
CreateDynamicObject(14394, 370.83624267578, 2320.2700195313, 1888.7946777344, 0, 0, 179.43994140625);
CreateDynamicObject(14394, 370.92697143555, 2328.2631835938, 1888.7946777344, 0, 0, 179.43969726563);
CreateDynamicObject(3657, 373.32641601563, 2328.6003417969, 1889.0850830078, 0, 0, 269.96997070313);
CreateDynamicObject(3657, 375.27359008789, 2328.5871582031, 1889.0850830078, 0, 0, 269.96704101563);
CreateDynamicObject(3657, 377.10638427734, 2328.55078125, 1889.0850830078, 0, 0, 269.96704101563);
CreateDynamicObject(3657, 379.10192871094, 2328.5529785156, 1889.0850830078, 0, 0, 269.96704101563);
CreateDynamicObject(3657, 381.24136352539, 2328.552734375, 1889.0850830078, 0, 0, 269.96704101563);
CreateDynamicObject(3657, 383.30206298828, 2328.5458984375, 1889.0850830078, 0, 0, 269.96704101563);
CreateDynamicObject(3657, 373.34204101563, 2320.0771484375, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(3657, 375.22265625, 2320.0434570313, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(3657, 377.12313842773, 2320.0419921875, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(3657, 379.14074707031, 2320.0615234375, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(3657, 381.31060791016, 2320.05859375, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(3657, 383.32202148438, 2320.029296875, 1889.0850830078, 0, 0, 269.96154785156);
CreateDynamicObject(8131, 359.04635620117, 2324.1560058594, 1890.9467773438, 334.75, 0, 270.44000244141);
CreateDynamicObject(14705, 367.74389648438, 2322.6496582031, 1890.7045898438, 0, 0, 0);
CreateDynamicObject(2208, 367.70974731445, 2325.3110351563, 1889.6047363281, 0, 0, 269.95498657227);
CreateDynamicObject(2868, 367.74664306641, 2325.3173828125, 1890.4699707031, 0, 0, 0);
CreateDynamicObject(2894, 367.60568237305, 2324.0219726563, 1890.4699707031, 0, 0, 269.39514160156);
CreateDynamicObject(2869, 368.66561889648, 2331.6791992188, 1889.6047363281, 0, 0, 320.9599609375);
CreateDynamicObject(2869, 365.07345581055, 2331.7023925781, 1889.6047363281, 0, 0, 322.20654296875);
CreateDynamicObject(2869, 365.21087646484, 2316.7504882813, 1889.6047363281, 0, 0, 320.95458984375);
CreateDynamicObject(2869, 368.77743530273, 2316.8020019531, 1889.6047363281, 0, 0, 320.95458984375);
CreateDynamicObject(2896, 367.05938720703, 2318.2067871094, 1890.2440185547, 0, 0, 0);
CreateDynamicObject(1664, 367.76473999023, 2323.0808105469, 1890.63671875, 0, 0, 0);
CreateDynamicObject(1667, 367.53042602539, 2323.2294921875, 1890.55859375, 0, 0, 0);
CreateDynamicObject(2869, 375.79760742188, 2316.7111816406, 1888.5668945313, 0, 0, 320.95458984375);
CreateDynamicObject(2869, 382.89117431641, 2316.5712890625, 1888.5668945313, 0, 0, 320.95458984375);
CreateDynamicObject(2869, 375.69821166992, 2331.720703125, 1888.5668945313, 0, 0, 320.95458984375);
CreateDynamicObject(2869, 382.8698425293, 2331.7434082031, 1888.5668945313, 0, 0, 320.95458984375);
CreateDynamicObject(6959, 375.40222167969, 2326.0595703125, 1915.3721923828, 0, 0, 0);
CreateDynamicObject(6959, 387.21533203125, 2323.322265625, 1924.6811523438, 0, 269.68676757813, 2.75);
CreateDynamicObject(3462, 364.39996337891, 2328.1259765625, 1890.3927001953, 0, 0, 179.65002441406);
CreateDynamicObject(3462, 364.37484741211, 2320.1662597656, 1890.3676757813, 0, 0, 180.3984375);
return 1;
}
new MAX_PING = 500;
enum gPInfo
{
    Logged,
    Regged,
    Level,
    Muted,
    Kills,
    Deaths,
    AdminDuty,
    Spectate,
    Jail
};
new PInfo[MAX_PLAYERS][gPInfo];
new Text3D:label[MAX_PLAYERS];
new Godtimer;
stock IsValidSkin(SkinID)
{
if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)) return true;
else return false;
}
public SaveIn(filename[],text[])
{
new File:Lfile;
new filepath[256];
new string[256];
new year,month,day;
new hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
format(filepath,sizeof(filepath),\"admin/%s.txt\",filename);
Lfile = fopen(filepath,io_append);
format(string,sizeof(string),\"[%02d/%02d/%02d | %02d:%02d:%02d] %s\\r\\n\",day,month,year,hour,minute,second,text);
fwrite(Lfile,string);
fclose(Lfile);
return 1;
}
stock IsNumeric(string[])
{
for (new i = 0, j = strlen(string);
i < j; i++)
{
if (string > \'9\' || string < \'0\')
return 0;
}
return 1;
}
stock SetAllHealth(Float:health)
{
Loop(i, MAX_PLAYERS)
{
    if(IsPlayerConnected(i))
{
       SetPlayerHealth(i, health);
}
}
return 1;
}
stock SetAllArmor(Float:armor)
{
Loop(i, MAX_PLAYERS)
{
    if(IsPlayerConnected(i))
{
       SetPlayerArmour(i, armor);
}
}
return 1;
}
stock GivePlayerScore(playerid, score)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + (score) );
return 1;
}
 
stock AdminCommand(playerid,command[])
{
new string[128];
GetPlayerName(playerid,string,128);
format(string,sizeof(string),\"<< Adminisztrátor %s || Színt: %d || Használta: %s >>\", string, PInfo[playerid][Level], command);
Loop(i, MAX_PLAYERS)
{
if(PInfo[Level] >= 1)
{
   SendClientMessage(i, YELLOW, string);
}
}
}
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
//Other
#pragma unused ret_memcpy
 
new VehicleName[][] =
{
   \"Landstalker\",
   \"Bravura\",
   \"Buffalo\",
   \"Linerunner\",
   \"Pereniel\",
   \"Sentinel\",
   \"Dumper\",
   \"Firetruck\",
   \"Trashmaster\",
   \"Stretch\",
   \"Manana\",
   \"Infernus\",
   \"Voodoo\",
   \"Pony\",
   \"Mule\",
   \"Cheetah\",
   \"Ambulance\",
   \"Leviathan\",
   \"Moonbeam\",
   \"Esperanto\",
   \"Taxi\",
   \"Washington\",
   \"Bobcat\",
   \"Mr Whoopee\",
   \"BF Injection\",
   \"Hunter\",
   \"Premier\",
   \"Enforcer\",
   \"Securicar\",
   \"Banshee\",
   \"Predator\",
   \"Bus\",
   \"Rhino\",
   \"Barracks\",
   \"Hotknife\",
   \"Trailer\",
   \"Previon\",
   \"Coach\",
   \"Cabbie\",
   \"Stallion\",
   \"Rumpo\",
   \"RC Bandit\",
   \"Romero\",
   \"Packer\",
   \"Monster Truck\",
   \"Admiral\",
   \"Squalo\",
   \"Seasparrow\",
   \"Pizzaboy\",
   \"Tram\",
   \"Trailer\",
   \"Turismo\",
   \"Speeder\",
   \"Reefer\",
   \"Tropic\",
   \"Flatbed\",
   \"Yankee\",
   \"Caddy\",
   \"Solair\",
   \"Berkley\'s RC Van\",
   \"Skimmer\",
   \"PCJ-600\",
   \"Faggio\",
   \"Freeway\",
   \"RC Baron\",
   \"RC Raider\",
   \"Glendale\",
   \"Oceanic\",
   \"Sanchez\",
   \"Sparrow\",
   \"Patriot\",
   \"Quad\",
   \"Coastguard\",
   \"Dinghy\",
   \"Hermes\",
   \"Sabre\",
   \"Rustler\",
   \"ZR-350\",
   \"Walton\",
   \"Regina\",
   \"Comet\",
   \"BMX\",
   \"Burrito\",
   \"Camper\",
   \"Marquis\",
   \"Baggage\",
   \"Dozer\",
   \"Maverick\",
   \"News Chopper\",
   \"Rancher\",
   \"FBI Rancher\",
   \"Virgo\",
   \"Greenwood\",
   \"Jetmax\",
   \"Hotring\",
   \"Sandking\",
   \"Blista Compact\",
   \"Police Maverick\",
   \"Boxville\",
   \"Benson\",
   \"Mesa\",
   \"RC Goblin\",
   \"Hotring Racer\",
   \"Hotring Racer\",
   \"Bloodring Banger\",
   \"Rancher\",
   \"Super GT\",
   \"Elegant\",
   \"Journey\",
   \"Bike\",
   \"Mountain Bike\",
   \"Beagle\",
   \"Cropdust\",
   \"Stunt\",
   \"Tanker\",
   \"RoadTrain\",
   \"Nebula\",
   \"Majestic\",
   \"Buccaneer\",
   \"Shamal\",
   \"Hydra\",
   \"FCR-900\",
   \"NRG-500\",
   \"HPV1000\",
   \"Cement Truck\",
   \"Tow Truck\",
   \"Fortune\",
   \"Cadrona\",
   \"FBI Truck\",
   \"Willard\",
   \"Forklift\",
   \"Tractor\",
   \"Combine\",
   \"Feltzer\",
   \"Remington\",
   \"Slamvan\",
   \"Blade\",
   \"Freight\",
   \"Streak\",
   \"Vortex\",
   \"Vincent\",
   \"Bullet\",
   \"Clover\",
   \"Sadler\",
   \"Firetruck\",
   \"Hustler\",
   \"Intruder\",
   \"Primo\",
   \"Cargobob\",
   \"Tampa\",
   \"Sunrise\",
   \"Merit\",
   \"Utility\",
   \"Nevada\",
   \"Yosemite\",
   \"Windsor\",
   \"Monster Truck\",
   \"Monster Truck\",
   \"Uranus\",
   \"Jester\",
   \"Sultan\",
   \"Stratum\",
   \"Elegy\",
   \"Raindance\",
   \"RC Tiger\",
   \"Flash\",
   \"Tahoma\",
   \"Savanna\",
   \"Bandito\",
   \"Freight\",
   \"Trailer\",
   \"Kart\",
   \"Mower\",
   \"Duneride\",
   \"Sweeper\",
   \"Broadway\",
   \"Tornado\",
   \"AT-400\",
   \"DFT-30\",
   \"Huntley\",
   \"Stafford\",
   \"BF-400\",
   \"Newsvan\",
   \"Tug\",
   \"Trailer\",
   \"Emperor\",
   \"Wayfarer\",
   \"Euros\",
   \"Hotdog\",
   \"Club\",
   \"Trailer\",
   \"Trailer\",
   \"Andromada\",
   \"Dodo\",
   \"RC Cam\",
   \"Launch\",
   \"Police Car (LSPD)\",
   \"Police Car (SFPD)\",
   \"Police Car (LVPD)\",
   \"Police Ranger\",
   \"Picador\",
   \"S.W.A.T. Van\",
   \"Alpha\",
   \"Phoenix\",
   \"Glendale\",
   \"Sadler\",
   \"Luggage Trailer\",
   \"Luggage Trailer\",
   \"Stair Trailer\",
   \"Boxville\",
   \"Farm Plow\",
   \"Utility Trailer\"
};
#pragma unused VehicleName
public OnPlayerConnect(playerid)
{
PInfo[playerid][Logged] = 0;
    PInfo[playerid][Regged] = 0;
    PInfo[playerid][Level] = 0;
    PInfo[playerid][Jail] = 0;
    PInfo[playerid][Kills] = 0;
    PInfo[playerid][Deaths] = 0;
    PInfo[playerid][AdminDuty] = 0;
    PInfo[playerid][Muted] = 0;
    new n[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,n,sizeof(n));
    format(file,sizeof(file),\"admin/users/%s.txt\",n);
    if(!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, \"Regisztrálás\", \"Üdv neked nincsen fiókod! Hozzál létre egyett írd be a kodot!\", \"Oké\", \"Mégsem\");
        PInfo[playerid][Regged] = 0;
        PInfo[playerid][Logged] = 0;
        }
        else
        {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, \"Bejeletkezés\", \"Üdv neked már van fiókod! Kérlek jeletkezz be!\", \"Oké\", \"Mégsem\");
        PInfo[playerid][Regged] = 1;
        PInfo[playerid][Logged] = 0;
}
        return 1;
    }
public OnPlayerDisconnect(playerid, reason)
{
    new n[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,n,sizeof(n));
    format(file,sizeof(file),\"admin/users/%s.txt\",n);
    PInfo[playerid][Logged] = 0;
    switch(reason)
    {
case 0:
{
          if(dini_Exists(file))
          {
             dini_IntSet(file,\"Score\",GetPlayerScore(playerid));
             dini_IntSet(file,\"Cash\",GetPlayerMoney(playerid));
             dini_IntSet(file,\"Logged\",0);
      dini_IntSet(file,\"Deaths\",PInfo[playerid][Deaths]);
      dini_IntSet(file,\"Kills\",PInfo[playerid][Kills]);
              return 1;
   }
}
case 1:
{
          if(dini_Exists(file))
          {
             dini_IntSet(file,\"Score\",GetPlayerScore(playerid));
             dini_IntSet(file,\"Cash\",GetPlayerMoney(playerid));
             dini_IntSet(file,\"Logged\",0);
             dini_IntSet(file,\"Deaths\",PInfo[playerid][Deaths]);
      dini_IntSet(file,\"Kills\",PInfo[playerid][Kills]);
              return 1;
   }
}
case 2:
{
          if(dini_Exists(file))
          {
             dini_IntSet(file,\"Score\",GetPlayerScore(playerid));
             dini_IntSet(file,\"Cash\",GetPlayerMoney(playerid));
             dini_IntSet(file,\"Logged\",0);
             dini_IntSet(file,\"Deaths\",PInfo[playerid][Deaths]);
      dini_IntSet(file,\"Kills\",PInfo[playerid][Kills]);
              return 1;
   }
}
}
Delete3DTextLabel(label[playerid]);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
    {
    new file[256],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),\"admin/users/%s.txt\",n);
    ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, \"Regisztrálás\", \"Üdv, neked még nincsen fiókod hozzál létre egyet írd be a jelszavad!\", \"Regizz\", \"Mégse\");
           dini_Create(file);
            dini_Set(file,\"Password\",inputtext);
            dini_IntSet(file,\"Regged\",1);
            dini_IntSet(file,\"Logged\",0);
            dini_IntSet(file,\"Level\",0);
            dini_IntSet(file,\"Score\",GetPlayerScore(playerid));
            dini_IntSet(file,\"Cash\",GetPlayerMoney(playerid));
            dini_IntSet(file,\"Deaths\",0);
   dini_IntSet(file,\"Kills\",0);
            SendClientMessage(playerid,ORANGE,\"AccServ: Üdvözllek! Neked már van fiókod kezdésnek kapol 50000$!\");
            PInfo[playerid][Regged] = 1;
    }
   
if (dialogid == 2)
{
        new file[256],n[MAX_PLAYER_NAME];
        GetPlayerName(playerid,n,MAX_PLAYER_NAME);
        format(file,sizeof(file),\"admin/users/%s.txt\",n);
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, \"Bejeletkezés\", \"Már regisztráltál a szerveren ezért jeletkezz be!\", \"Login\", \"Mégsem\");
        new pass;
        pass = dini_Int(file,\"Password\");
        if(udb_hash(inputtext) != pass) {
            SendClientMessage(playerid, GREY, \"Rossz jelszó!.\");
            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, \"Bejeletkezés\", \"Már regisztráltál a szerveren ezért jeletkezz be!\", \"Bejeletkezés\", \"Mégsem\");
        }
        else
        {
                PInfo[playerid][Regged] = 1;
                new buf[145];
            WP_Hash(buf, sizeof(buf), inputtext);
      dini_IntSet(file,\"Logged\",1);
                PInfo[playerid][Logged] = 1;
                PInfo[playerid][Level] = dini_Int(file,\"Level\");
                SetPlayerScore(playerid, dini_Int(file,\"Score\"));
             SetPlayerMoney(playerid, dini_Int(file,\"Cash\"));
             PInfo[playerid][Deaths] = dini_Int(file,\"Deaths\");
             PInfo[playerid][Kills] = dini_Int(file,\"Kills\");
                if(PInfo[playerid][Level] == 0)
         return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Játékos\");
      if(PInfo[playerid][Level] == 1)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Segítõkész\");
      if(PInfo[playerid][Level] == 2)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Moderátór\");
      if(PInfo[playerid][Level] == 3)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: V.I.P)\");
      if(PInfo[playerid][Level] == 4)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Adminisztrátor\");
      if(PInfo[playerid][Level] == 5)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Fõ Adminisztrátor\");
      if(PInfo[playerid][Level] > 5)
          return SendClientMessage(playerid,YELLOW,\"AccServ: Sikeres Belépés! Státusz: Tulajdonós)\");
               }
     }
     return 1;
}
CMD:setlevel(playerid,params[])
{
    new level,id,file[256],n[MAX_PLAYER_NAME];//creating the new variabls
    new tmp[256], tmp2[256], Index,str[51];// creating the new variables
    tmp = strtok(params,Index), tmp2 = strtok(params,Index),id = strval(tmp),level = strval(tmp2);// setting them to strtok so we can use them as parameters of our command
    GetPlayerName(id,n,MAX_PLAYER_NAME);//getting the players name
    format(file,sizeof(file),\"admin/users/%s.txt\",n);//formatting the file
    if(PInfo[playerid][Level] < 5)
return SendClientMessage(playerid,GREY,\"Nem vagy Admin!\");//if the player is not rcon admin
    if(!strlen(params))
return SendClientMessage(playerid,GREY,\"USAGE: /setlevel <JátékosID> <Színt>\");// if the string is empty
    if(!IsPlayerConnected(id))
return SendClientMessage(playerid,GREY,\"Nem létezik ez a játékos!\"); //if the id is not connected
    PInfo[id][Level] = level;//sets the level of the player
    dini_IntSet(file,\"Level\",level);//saves the new level to the file
    format(str,sizeof(str),\"Te átválottad %s\' -nek/nak az Adminisztrátor színtett %d!\",n,level);//creates the string
    SendClientMessage(playerid,LIGHTBLUE,str);
    return 1;
}
CMD:kick(playerid,params[])
{
    new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
    new tmp[256], tmp2[256], Index, str[128];
    tmp = strtok(params,Index);
    tmp2 = strtok(params,Index);
id = strval(tmp);
    GetPlayerName(id,on,sizeof(on));
    GetPlayerName(playerid,n,sizeof(n));
    if(PInfo[playerid][Level] < 1)
return SendClientMessage(playerid,ORANGE,\"Nem vagy Admin!\");
    if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /kick <JátékosID> <Indok> \");
    if(!strlen(tmp2))
    {
       format(str,sizeof(str),\"..:: Adminisztrátor %s kirúgta a szerverrõl %s -t! Indok: Nincsen Indok ::..\",n,on);
return SendClientMessageToAll(YELLOW, str);
}
    if(!IsPlayerConnected(id))
return SendClientMessage(playerid,GREY,\"Invalid ID\");
    format(str,sizeof(str),\"..:: Adminisztrátor %s kirúgta a szerverrõl %s -t! Indok: %s ::..\",n,on,params[strlen(tmp)+1]);
    SendClientMessageToAll(YELLOW, str);
    Kick(id);
    return 1;
}
CMD:ban(playerid,params[])
{
    new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
    new tmp[256], tmp2[256], Index, str[128];
    tmp = strtok(params,Index), id = strval(tmp);
    tmp2 = strtok(params, Index);
    GetPlayerName(id,on,sizeof(on));
    GetPlayerName(playerid,n,sizeof(n));
    if(PInfo[playerid][Level] < 3)
return SendClientMessage(playerid,ORANGE,\"Nem vagy Admin!\");
    if(!strlen(params))
return SendClientMessage(playerid,GREY,\"USAGE: /ban <JátékosID> <Indok> \");
    if(!IsPlayerConnected(id))
return SendClientMessage(playerid,GREY,\"Nemlétezõ ID!\");
    if(!strlen(tmp2))
    {
       format(str,sizeof(str),\"..:: Adminisztrátor %s kibannolta a szerverrõl %s -t! Indok: Nincs Indok ::..\",n,on);
return SendClientMessageToAll(YELLOW, str);
}
format(str,sizeof(str),\"..:: Adminisztrátor %s kibannolta a szerverrõl %s -t! Indok: %s ::..\",n,on,params[strlen(tmp)+1]);
    SendClientMessageToAll(ORANGE,str);
    BanEx(id, params[strlen(tmp)+1]);
    return 1;
}
CMD:mute(playerid, params[])
{
if(PInfo[playerid][Level] < 2)
return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256], Index, id;
tmp = strtok(params, Index);
id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"HASZNÁLAT: /mute <JátékosID>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Rossz ID\");
new string[65];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
if(PInfo[id][Muted] == 1)
{
    PInfo[id][Muted] = 0;
    format(string, 65, \"Feloldtad a Némítást: %s\", pName);
    SendClientMessage(playerid, YELLOW, string);
    format(string, 65, \"[FIGYELMESZTETÉS]: Adminisztrátor %s feloldta a Némítást!\", aName);
    SendClientMessage(id, YELLOW, string);
}
else
{
PInfo[id][Muted] = 1;
    format(string, 65, \"Némítottad: %s\", pName);
    SendClientMessage(playerid, YELLOW, string);
    format(string, 65, \"[FIGYELMESZTETÉS]: Némítva lettél %s álttal!\", aName);
    SendClientMessage(id, YELLOW, string);
}
return 1;
}
CMD:looptest(playerid, params[])
{
#pragma unused params
if(IsPlayerAdmin(playerid))
{
Loop(i, MAX_PLAYERS) // Loop through your defined MAX_PLAYERS ^^
{
    if(IsPlayerConnected(i))
   {
      SendClientMessage(i, YELLOW, \"Looping\");
       return Kick(i);
   }
}
}
else return 0;
return 1;
}
CMD:healall(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] < 4)
return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new string[71];
GetPlayerName(playerid, string, 128);
format(string, 71, \"Adminisztrátor %s mindenki életétt felöltötte!\", string);
SendClientMessageToAll(YELLOW, string);
SetAllHealth(100.0);
AdminCommand(playerid, \"HEALALL\");
return 1;
}
CMD:armorall(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] < 4)
return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new string[71];
GetPlayerName(playerid, string, 128);
format(string, 71, \"Administrátor %s mindenki páncélzatát feltöltötte!\", string);
SendClientMessageToAll(YELLOW, string);
SetAllArmor(100.0);
AdminCommand(playerid, \"ARMORALL\");
return 1;
}
CMD:setscore(playerid, params[])
{
if(PInfo[playerid][Level] < 4)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256], tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
new score = strval(tmp2);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /setscore <JátékosID> <Pont> \");
if(!strlen(tmp2))
return SendClientMessage(playerid,GREY,\"USAGE: /setscore <JátékosID> <Pont> \");
    if(!IsPlayerConnected(id))
return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[72];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 72, \"Administrátor %s módosította a pontod %d!\", aName, score);
SendClientMessage(id, YELLOW, string);
format(string, 72, \"Átraktad a pontját %s! Pont: %d\", pName, score);
SendClientMessage(playerid, YELLOW, string);
SetPlayerScore(id, score);
AdminCommand(playerid, \"SETSCORE\");
return 1;
}
CMD:setmoney(playerid, params[])
{
if(PInfo[playerid][Level] < 2)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256], tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
new money = strval(tmp2);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /setmoney <JátékosID> <Pénz> \");
if(!strlen(tmp2))
return SendClientMessage(playerid,GREY,\"USAGE: /setmoney <JátékosID> <Pénz> \");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid,GREY,\"Rossz ID\");
new string[72];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 72, \"Administrátor %s módosította a pénzed $%d\", aName, money);
SendClientMessage(id, YELLOW, string);
format(string, 72, \"Átírtad %s pénzét $%d\", pName, money);
SendClientMessage(playerid, YELLOW, string);
SetPlayerMoney(id, money);
AdminCommand(playerid, \"SETMONEY\");
return 1;
}
CMD:richestplayers(playerid, params[])
{
#pragma unused params
new string[71], Slot1 = -1, Slot2 = -1, Slot3 = -1, Slot4 = -1;
new HighestCash = -9999;
SendClientMessage(playerid,GREEN,\"Richest Players Online:\");
for(new x=0; x<MAX_PLAYERS; x++)
if(IsPlayerConnected(x))
if(GetPlayerMoney(x) >= HighestCash)
{
HighestCash = GetPlayerMoney(x);
Slot1 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++)
if(IsPlayerConnected(x) && x != Slot1)
if(GetPlayerMoney(x) >= HighestCash)
{
HighestCash = GetPlayerMoney(x);
Slot2 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++)
if(IsPlayerConnected(x) && x != Slot1 && x != Slot2)
if(GetPlayerMoney(x) >= HighestCash)
{
HighestCash = GetPlayerMoney(x);
Slot3 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++)
if(IsPlayerConnected(x) && x != Slot1 && x != Slot2 && x != Slot3)
if(GetPlayerMoney(x) >= HighestCash)
{
HighestCash = GetPlayerMoney(x);
Slot4 = x;
}
format(string, sizeof(string), \"(%d) Player %s - $%d\", Slot1,PlayerName(Slot1),GetPlayerMoney(Slot1));
SendClientMessage(playerid,YELLOW,string);
if(Slot2 != -1){
format(string, sizeof(string), \"(%d) Player %s - $%d\", Slot2,PlayerName(Slot2),GetPlayerMoney(Slot2));
SendClientMessage(playerid,YELLOW,string);
}
if(Slot3 != -1){
format(string, sizeof(string), \"(%d) Player %s - $%d\", Slot3,PlayerName(Slot3),GetPlayerMoney(Slot3));
SendClientMessage(playerid,YELLOW,string);
}
if(Slot4 != -1){
format(string, sizeof(string), \"(%d) Player %s - $%d\", Slot4,PlayerName(Slot4),GetPlayerMoney(Slot4));
SendClientMessage(playerid,YELLOW,string);
}
return 1;
}
CMD:stats(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Logged] == 0)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy bejeletkezve!\");
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, 128, \"[sTATS]: Neved: %s, Pontod: %d, Pénzed: $%d, Adminszint: %d, Ölések: %d, Halállok: %d\", pName, GetPlayerScore(playerid), GetPlayerMoney(playerid), PInfo[playerid][Level], PInfo[playerid][Kills], PInfo[playerid][Deaths]);
SendClientMessage(playerid, GREEN, string);
return 1;
}
CMD:admins(playerid, params[])
{
new string[34];
#pragma unused params
SendClientMessage(playerid, GREEN, \"Elérhetõ Adminisztárotok!\");
Loop(i, MAX_PLAYERS)
{
new aName[MAX_PLAYER_NAME];
    if(PInfo[Level] >= 1)
    {
       GetPlayerName(i, aName, MAX_PLAYER_NAME);
       format(string, 128, \"Admin %d: %s\", PInfo[Level], aName);
}
}
SendClientMessage(playerid, YELLOW, string);
return 1;
}
CMD:get(playerid, params[])
{
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /get <JátékosD>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[78];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 78, \"Elteleportáltál %s játékosohoz!\", pName);
SendClientMessage(playerid, YELLOW, string);
format(string, 78, \"You have been teleported to administrator %s\'s position\", aName);
SendClientMessage(id, YELLOW, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(id, x, y, z);
AdminCommand(playerid, \"GET\");
return 1;
}
CMD:goto(playerid, params[])
{
    if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /goto <JátékosID>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Rossz ID!\");
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 128, \"Odateleportáltál %s Játékoshoz!\", pName);
SendClientMessage(playerid, YELLOW, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
SetPlayerPos(playerid, x, y, z);
AdminCommand(playerid, \"GOTO\");
return 1;
}
CMD:explode(playerid, params[])
{
if(PInfo[playerid][Level] < 2)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /explode <ID>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 128, \"You have exploded %s\", pName);
SendClientMessage(playerid, YELLOW, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
CreateExplosion(x, y, z, 7, 10.0);
AdminCommand(playerid, \"EXPLODE\");
return 1;
}
CMD:slap(playerid, params[])
{
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /slap <ID>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 128, \"You have slapped %s\", pName);
SendClientMessage(playerid, YELLOW, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
SetPlayerPos(id, x, y, z+5);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
PlayerPlaySound(id,1190,0.0,0.0,0.0);
new Float:health;
GetPlayerHealth(id, health);
SetPlayerHealth(id, health-15);
AdminCommand(playerid, \"SLAP\");
return 1;
}
CMD:givescore(playerid, params[])
{
if(PInfo[playerid][Level] < 4)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
new score = strval(tmp2);
if(!strlen(tmp))
return SendClientMessage(playerid,GREY,\"USAGE: /givescore <ID> <Score>\");
if(!strlen(tmp2))
return SendClientMessage(playerid,GREY,\"USAGE: /givescore <ID> <Score>\");
    if(!IsPlayerConnected(id))
   return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 128, \"You gave %s score to %s\", params[strlen(tmp)+1], pName);
SendClientMessage(playerid, YELLOW, string);
format(string, 128, \"Administrator %s gave you %s score\", aName, params[strlen(tmp)+1]);
SendClientMessage(id, YELLOW, string);
GivePlayerScore(id, score);
AdminCommand(playerid, \"GIVESCORE\");
return 1;
}
CMD:setskin(playerid,params[])
{
if(PInfo[playerid][Level] < 4)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new Index;
     new tmp[256];
      new tmp2[256];
      tmp  = strtok(params,Index);
      tmp2 = strtok(params,Index);
    if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2))
return SendClientMessage(playerid, GREY, \"USAGE: /setskin <ID> <Skin>\");
new id = strval(tmp);
new skin = strval(tmp2);
new string[128];
if(!IsValidSkin(skin))
return SendClientMessage(playerid, GREY, \"ERROR: Invaild Skin ID!\");
     if(!IsPlayerConnected(id) && id == INVALID_PLAYER_ID)
         return SendClientMessage(playerid,GREY,\"Invalid ID\");
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
format(string, 128, \"You have set %s\'s skin to %d\", pName, skin);
SendClientMessage(playerid, YELLOW, string);
format(string,sizeof(string),\"Administrator %s has set your skin to %d\", aName, skin);
SendClientMessage(id, YELLOW, string);
SetPlayerSkin(id, skin);
AdminCommand(playerid, \"SETSKIN\");
return 1;
}
CMD:report(playerid, params[])
{
new tmp[256];
new tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp) || !strlen(tmp2))
    return SendClientMessage(playerid, GREY, \"USAGE: /report <JátékosID> <Indok>\");
    if(!IsPlayerConnected(id))
         return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME];
new reported[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(id, reported, MAX_PLAYER_NAME);
SendClientMessage(playerid, YELLOW, \"A reportod síkeresen megérkezett minden Elérhetõ Adminnak! (NE ÍRD BE MEGINT)!\");
Loop(i, MAX_PLAYERS)
{
    if(PInfo[Level] >= 1)
    {
        format(string, 128, \"[REPORT]: Játékos %s jelentette %s! || Indok: %s\", pName, reported, params[strlen(tmp)+1]);
        SendClientMessage(i, YELLOW, string);
}
}
return 1;
}
CMD:adminduty(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
if(PInfo[playerid][AdminDuty] == 0)
{
    PInfo[playerid][AdminDuty] = 1;
    new string[128];
GetPlayerName(playerid, string, 128);
format(string, 128, \"Administrátor %s Szolgálatba lépett!\", string);
SendClientMessageToAll(LIGHTBLUE, string);
Godtimer = SetTimerEx(\"God\", 5000, 1, \"i\", playerid);
SetPlayerHealth(playerid, 10000);
GivePlayerWeapon(playerid, WEAPON_MINIGUN, 100000);
label[playerid] = Create3DTextLabel(\"Elérhetõ Admin!\",0x008080FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    SetPlayerSkin(playerid, 217);
    SetPlayerColor(playerid, LIGHTBLUE);
}
else
{
PInfo[playerid][AdminDuty] = 0;
new string[128];
GetPlayerName(playerid, string, 128);
format(string, 128, \"Administrátor %s killépet a szolgálatbol!\", string);
SendClientMessageToAll(LIGHTBLUE, string);
KillTimer(Godtimer);
SetPlayerHealth(playerid, 100.0);
Delete3DTextLabel(label[playerid]);
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
CMD:kill(playerid, params[])
{
#pragma unused params
SetPlayerHealth(playerid, 0.0);
return 1;
}
CMD:asay(playerid, params[])
{
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new string[128];
GetPlayerName(playerid, string, 128);
format(string, 128, \"Admin %s: %s\", string, params);
SendClientMessageToAll(LIGHTBLUE, string);
return 1;
}
CMD:spec(playerid, params[])
{
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp))
    return SendClientMessage(playerid, GREY, \"USAGE: /spec <JátékosID>\");
    if(!IsPlayerConnected(id))
         return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
format(string, 128, \"Figyeled: %s\", pName);
SendClientMessage(playerid, YELLOW, string);
format(string, 128, \"Administrator %s megfigyeli [%d]%s játékost!\", aName, id, pName);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, id);
PInfo[playerid][spectate] = 1;
Loop(i, MAX_PLAYERS)
{
    if(PInfo[Level] >= 1)
    {
        SendClientMessage(i, YELLOW, string);
}
}
return 1;
}
CMD:endspec(playerid, params[])
{
#pragma unused params
    if(PInfo[playerid][Level] < 1)
       return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
if(PInfo[playerid][spectate] == 0)
    return SendClientMessage(playerid, ORANGE, \"Már nézzel valakit!\");
TogglePlayerSpectating(playerid, 0);
PInfo[playerid][spectate] = 0;
SendClientMessage(playerid, YELLOW, \"Nézés kikapcsolva!\");
return 1;
}
CMD:adminarea(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
SetPlayerInterior(playerid, 10);
Streamer_UpdateEx(playerid, 382.7088,2324.7488,1889.5669);
SetPlayerPos(playerid, 382.7088,2324.7488,1889.5669);
TogglePlayerControllable(playerid,0);
GameTextForPlayer(playerid,\"Üdv az Adminházban!\",5000,3);
TogglePlayerControllable(playerid,0);
return 1;
}
CMD:jail(playerid, params[])
{
if(PInfo[playerid][Level] < 2)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256], tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
if(!strlen(tmp) || !strlen(tmp2))
    return SendClientMessage(playerid, GREY, \"USAGE: /jail <JátékosID> <Indok>\");
    if(!IsPlayerConnected(id))
         return SendClientMessage(playerid,GREY,\"Invalid ID\");
new string[128];
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
if(PInfo[id][Jail] == 0)
{
SetPlayerPos(id,197.6661,173.8179,1003.0234);
SetPlayerInterior(id,3);
format(string, 128, \"Bezártad %s\", pName);
SendClientMessage(playerid, YELLOW, string);
format(string, 128, \"Administrátor %s bezárt téged! || Indok: %s\", aName, params[strlen(tmp)+1]);
SendClientMessage(id, YELLOW, string);
PInfo[id][Jail] = 1;
format(string, 128, \"Játékos %s be lett zárva börtönbe %s által! || Indok: %s\", pName, aName, params[strlen(tmp)+1]);
SendClientMessageToAll(YELLOW, string);
}
else
return SendClientMessage(playerid, ORANGE, \"Játékos már börtönben!\");
AdminCommand(playerid, \"JAIL\");
return 1;
}
CMD:unjail(playerid, params[])
{
if(PInfo[playerid][Level] < 2)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, MAX_PLAYER_NAME);
GetPlayerName(id, pName, MAX_PLAYER_NAME);
new string[128];
if(PInfo[id][Jail] == 1)
{
SpawnPlayer(id);
format(string, 128, \"Kiengedted %s\", pName);
SendClientMessage(playerid, YELLOW, string);
format(string, 128, \"Administrátor %s kiengedett a börtönbõl!\", aName);
SendClientMessage(id, YELLOW, string);
format(string, 128, \"Játékos %s ki lett engedve a börtönbõl %s által!\", pName, aName);
SendClientMessageToAll(YELLOW, string);
AdminCommand(playerid, \"UNJAIL\");
}
else if(PInfo[id][Jail] == 0)
    SendClientMessage(playerid, ORANGE, \"Játékos nincsen börtönben!\");
return 1;
}
CMD:spawn(playerid, params[])
{
if(PInfo[playerid][Level] < 1)
    return SendClientMessage(playerid, ORANGE, \"Nem vagy Admin!\");
new tmp[256];
new Index;
tmp = strtok(params, Index);
new id = strval(tmp);
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(id, pName, MAX_PLAYER_NAME);
SpawnPlayer(id);
format(string, 128, \"Újra Spawnoltál %s\", pName);
SendClientMessage(playerid, YELLOW, string);
AdminCommand(playerid, \"SPAWN\");
return 1;
}
CMD:gmx(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid))
{
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
    if(!strlen(params))
    {
   format(string,sizeof(string), \"Administrátor %s restartolta a szervert. || Indok: Nincsen Indok.\", playername);
}
else
{
   format(string,sizeof(string), \"Administrátor %s restartolta a szervert. || Indok: %s\", playername, params);
}
for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayerPlaySound(i,1057,0.0,0.0,0.0);
SendClientMessageToAll(YELLOW, string);
SendRconCommand(\"gmx\");
}
else return 0;
return 1;
}
 
CMD:ahelp(playerid, params[])
{
#pragma unused params
if(PInfo[playerid][Level] == 1)
{
    SendClientMessage(playerid, YELLOW, \"Level 1: kick, get, goto, slap, adminduty, asay, spec, endspec, adminarea, spawn\");
}
else if(PInfo[playerid][Level] == 2)
{
SendClientMessage(playerid, YELLOW, \"Level 1: kick, get, goto, slap, adminduty, asay, spec, endspec, adminarea, spawn\");
SendClientMessage(playerid, YELLOW, \"Level 2: mute, setmoney, explode, jail, unjail\");
}
else if(PInfo[playerid][Level] == 3)
{
SendClientMessage(playerid, YELLOW, \"Level 1: kick, get, goto, slap, adminduty, asay, spec, endspec, adminarea, spawn\");
SendClientMessage(playerid, YELLOW, \"Level 2: mute, setmoney, explode, jail, unjail\");
SendClientMessage(playerid, YELLOW, \"Level 3: ban\");
}
else if(PInfo[playerid][Level] == 4)
{
SendClientMessage(playerid, YELLOW, \"Level 1: kick, get, goto, slap, adminduty, asay, spec, endspec, adminarea, spawn\");
SendClientMessage(playerid, YELLOW, \"Level 2: mute, setmoney, explode, jail, unjail\");
SendClientMessage(playerid, YELLOW, \"Level 3: ban\");
SendClientMessage(playerid, YELLOW, \"Level 4: healall, armorall, setscore, givescore, setskin\");
}
else if(PInfo[playerid][Level] == 5)
{
SendClientMessage(playerid, YELLOW, \"Level 1: kick, get, goto, slap, adminduty, asay, spec, endspec, adminarea, spawn\");
SendClientMessage(playerid, YELLOW, \"Level 2: mute, setmoney, explode, jail, unjail\");
SendClientMessage(playerid, YELLOW, \"Level 3: ban\");
SendClientMessage(playerid, YELLOW, \"Level 4: healall, armorall, setscore, givescore, setskin\");
SendClientMessage(playerid, YELLOW, \"Level 5: setlevel, gmx\");
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(PInfo[playerid][AdminDuty] == 1)
{
    label[playerid] = Create3DTextLabel(\"Elérhetõ Admin!\",0x008080FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    SetPlayerSkin(playerid, 217);
    SetPlayerHealth(playerid, 10000);
GivePlayerWeapon(playerid, WEAPON_MINIGUN, 100000);
}
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_CROUCH)
{
    if(PInfo[playerid][spectate] == 1)
    {
        TogglePlayerSpectating(playerid, 0);
        PInfo[playerid][spectate] = 0;
}
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == \'#\' || text[0] == \'.\' && PInfo[playerid][Level] >= 1)
{
    new string[128];
   GetPlayerName(playerid, string, 128);
format(string,sizeof(string),\"[ADMINCHAT] %s: %s\",string,text[1]);
Loop(i, MAX_PLAYERS)
{
    if(PInfo[Level] >= 1)
      SendClientMessage(playerid, YELLOW, string);
}
    return 0;
}
if(PInfo[playerid][Muted] == 1)
{
SendClientMessage(playerid, GREY, \"Nem írhatol mert némítva vagy!\");
return 0;
}
if(PInfo[playerid][AdminDuty] == 1)
{
    new string[128];
    GetPlayerName(playerid, string, 128);
    format(string, 128, \"Admin %s: %s\", string, text);
SendClientMessageToAll(LIGHTBLUE, string);
return 0;
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(PInfo[playerid][Logged] == 0)
{
    SendClientMessage(playerid, ORANGE, \"Nem vagy bejeletkezve vagy regisztrálva\");
    return 0;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
PInfo[playerid][Deaths]++;
PInfo[killerid][Kills]++;
return 1;
}
public ServerBot()
{
new string[128];
Loop(i, MAX_PLAYERS)
{
    new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, MAX_PLAYER_NAME);
    if(GetPlayerPing(i) > MAX_PING && GetPlayerPing(i) < 2500)
    {
   format(string, 128, \"[sZERVER]: %s ki lett rúgva a szerverrõl! || Indok: Nagy Ping (%d), Max (%d)\",pName, GetPlayerPing(i), MAX_PING);
   SendClientMessageToAll(GREY, string);
   Kick(i);
}
if(GetPlayerWeapon(i) == WEAPON_MINIGUN && PInfo[Level] < 1)
{
    format(string, 128, \"[sZERVER]: %s bannolva lett a szerverrõl! || Indok: Fegyver Hack\", pName);
    SendClientMessageToAll(GREY, string);
    BanEx(i, \"Fegyver Hack!\");
}
}
return 1;
}
public God(playerid)
{
SetPlayerHealth(playerid, 10000);
return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal