[Pomoc] Account System

Započeo Terza, Avgust 03, 2011, 20:49:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moj GM od 0
Detaljan opis problema:Na ulazak na serveru ne izbacuje dialog za reg/login
Dio skripte:Nezz koji je dio evo citava
//All the credits goes to me(Ricardo_Rodrigues) and for the sa-mp forum users, for the help given with some commands.
//Edited and Translated by Terza

#include <a_samp>
#include <dini>
#include <dudb>
#include <zcmd>
#include <sscanf2>

#pragma unused ret_memcpy
#define COLOR_YELLOW 0xD8D8D8FF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define DIALOGID 3300
new IsLogged[MAX_PLAYERS];
new file[256];
new bool:ismuted[MAX_PLAYERS];

main()
{
}

enum pInfo
{
AdminLevel,
Cash,
Score,
Color,
Job,
Vw,
Int,
Warns,
Fleader,
Fmember,
Bank,
Prods,
Skin,
RepairOffer,
Credit,
}
new PlayerInfo[MAX_PLAYERS][pInfo];


public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" RAdmin System by Ricardo_Rodrigues,edited by Terza");
print("--------------------------------------\n");
return 1;
}

//--------------------------------------Login/Register System--------------------------------------------------------
public OnPlayerConnect(playerid)
{
IsLogged[playerid] = 0;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "Korisnici/%s.ini", name);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Niste Registrovani!", "DobrodoÅ¡li, niste registrovani, molimo upiÅ¡ite željenu Å¡ifru.", "Registracija", "Odustani");
    }
    if(fexist(file))
    {
       ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registrovani ste!", "VaÅ¡ racun je registrovan, molimo upiÅ¡ite vaÅ¡u Å¡ifru.", "Prijava", "Odustani");
    }
    if(PlayerInfo[playerid][Warns] == 5)
    {
        SendClientMessage(playerid, 0xFF00CC, "VaÅ¡ racun je boliran sa max. postignutih 5 warn-ova, na forumu zatražite unblock.");
Kick(playerid);
}
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "Korisnici/%s.ini", name);
if(!response) return Kick(playerid);
if(!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Niste Registrovani!", "Dobrodošli, niste registrovani, molimo upišite željenu šifru.", "Registracija", "Odustani");
dini_Create(file);
dini_IntSet(file, "Sifra", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
dini_IntSet(file, "Novac",PlayerInfo[playerid][Cash] = 500);
dini_IntSet(file, "Level",PlayerInfo[playerid][Score] = 0);
dini_IntSet(file, "Posap",PlayerInfo[playerid][Job] = 0);
dini_IntSet(file, "Boja",PlayerInfo[playerid][Color] = 0);
dini_IntSet(file, "Vw",PlayerInfo[playerid][Vw] = 0);
dini_IntSet(file, "Int",PlayerInfo[playerid][Int] = 0);
dini_IntSet(file, "Warnovi",PlayerInfo[playerid][Warns] = 0);
dini_IntSet(file, "Lider",PlayerInfo[playerid][Fleader] = 0);
dini_IntSet(file, "Clan",PlayerInfo[playerid][Fmember] = 0);
dini_IntSet(file, "Banka",PlayerInfo[playerid][Bank] = 0);
dini_IntSet(file, "Proizvodi",PlayerInfo[playerid][Prods] = 0);
dini_IntSet(file, "Skin",PlayerInfo[playerid][Skin] = 0);
dini_IntSet(file, "Ponuda za popravak",PlayerInfo[playerid][RepairOffer] = 0);
dini_IntSet(file, "Kredit",PlayerInfo[playerid][Credit] = 0);
format(string, 128, "[SYSTEM]: Uspješno ste se registrovali %s sa šifrom %s, automatski ste prijavljeni.", name, inputtext);
SendClientMessage(playerid, 0xFF00CC, string);
IsLogged[playerid] = 1;
}

if (dialogid == 2)
{
      new name[MAX_PLAYER_NAME];
      GetPlayerName(playerid, name, sizeof(name));
      format(file, sizeof(file), "Korisnici/%s.ini", name);
      if(!response) return Kick(playerid);
      if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registrovani ste!", "Registrovani ste, molimo prijavite se.", "Prijava", "Odustani");
      new tmp;
      tmp = dini_Int(file, "Password");
      if(udb_hash(inputtext) != tmp) {
      SendClientMessage(playerid, 0xFF00CC, "PogreÅ¡na Å¡ifra.");
      ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registrovani ste!", "Registrovani ste, molimo upiÅ¡ite vaÅ¡u Å¡ifru.", "Prijava", "Odustani");
      }
      else
      {
IsLogged[playerid] = 1;
      SetPlayerMoney(playerid, dini_Int(file, "Novac"));
      SetPlayerScore(playerid, dini_Int(file, "Level"));
      SetPlayerColor(playerid, dini_Int(file, "Boja"));
      SetPlayerVirtualWorld(playerid, dini_Int(file, "Vw"));
      SetPlayerInterior(playerid, dini_Int(file, "Int"));
      PlayerInfo[playerid][Job] = dini_Int(file, "Posao");
      PlayerInfo[playerid][Warns] = dini_Int(file, "Warnovi");
      PlayerInfo[playerid][Fleader] = dini_Int(file, "Lider");
      PlayerInfo[playerid][Fmember] = dini_Int(file, "Clan");
      PlayerInfo[playerid][Bank] = dini_Int(file, "Banka");
      PlayerInfo[playerid][Prods] = dini_Int(file, "Proizvodi");
      PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
      PlayerInfo[playerid][RepairOffer] = dini_Int(file, "Ponuda za popravak");
      PlayerInfo[playerid][Credit] = dini_Int(file, "Kredit");
      SetPlayerSkin(playerid, dini_Int(file, "Skin"));
SendClientMessage(playerid,0xFF00CC, "[SYSTEM]: Uspješno prijavljeni!");
}
}
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new name[24];
    GetPlayerName(playerid,name,24);
    format(file,sizeof(file),"Korisnici/%s.ini",name);
    if(dini_Exists(file))
    {
        dini_IntSet(file,"Novac",GetPlayerMoney(playerid));
        dini_IntSet(file,"Level",GetPlayerScore(playerid));
        dini_IntSet(file,"Boja",GetPlayerColor(playerid));
        dini_IntSet(file,"AdminLevel",PlayerInfo[playerid][AdminLevel]);
        dini_IntSet(file,"Posao",PlayerInfo[playerid][Job]);
        dini_IntSet(file,"Vw",GetPlayerVirtualWorld(playerid));
        dini_IntSet(file,"Int",GetPlayerInterior(playerid));
        dini_IntSet(file,"Warnovi",PlayerInfo[playerid][Warns]);
        dini_IntSet(file,"Lider",PlayerInfo[playerid][Fleader]);
        dini_IntSet(file,"Clan",PlayerInfo[playerid][Fmember]);
        dini_IntSet(file,"Banka",PlayerInfo[playerid][Bank]);
        dini_IntSet(file,"Proizvodi",PlayerInfo[playerid][Prods]);
        dini_IntSet(file,"Skin",GetPlayerSkin(playerid));
        dini_IntSet(file,"Ponuda za popravak",PlayerInfo[playerid][RepairOffer]);
        dini_IntSet(file,"Kredit",PlayerInfo[playerid][Credit]);
        IsLogged[playerid] = 0;
    return 1;
    }
    return 1;
}
//--------------------------------------------Mute System------------------------------------
public OnPlayerText(playerid, text[])
{
    if(ismuted[playerid])
    {
        SendClientMessage(playerid, 0xFF00CC, "Nijemi ste.");
        return 0;
    }
    return 1;
}
//-------------------------------Commands----------------------------------------------------
COMMAND:acmds(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] == 0)
{
    SendClientMessage(playerid, 0xD8D8D8FF, " Niste Administrator.");
}
else
if(PlayerInfo[playerid][AdminLevel] == 1)
{
    SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 1:/kick /freeze /unfreeze /spawnplayer /setvw /setint");
}
if(PlayerInfo[playerid][AdminLevel] == 2)
{
    SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 1:/kick /freeze /unfreeze /spawnplayer /setvw /setint"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 2:/mute /unmute /sethp /setarmour /getmoney /getstats /clearchat");
}
if(PlayerInfo[playerid][AdminLevel] == 3)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 1:/kick /freeze /unfreeze /spawnplayer /setvw /setint"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 2:/mute /unmute /sethp /setarmour /getmoney /getstats /clearchat"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 3:/ban /givemoney /setmoney /setscore /warn /spawncar");
}
if(PlayerInfo[playerid][AdminLevel] == 4)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 1:/kick /freeze /unfreeze /spawnplayer /setvw /setint"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 2:/mute /unmute /sethp /setarmour /getmoney /getstats /clearchat"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 3:/ban /givemoney /setmoney /setscore /warn /spawncar"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 4:/goto /gethere /ajail /aunjail /giveweapon /akill /vr");
}
if(PlayerInfo[playerid][AdminLevel] == 5)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 1:/kick /freeze /unfreeze /spawnplayer /setvw /setint"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 2:/mute /unmute /sethp /setarmour /getmoney /getstats /clearchat"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 3:/ban /givemoney /setmoney /setscore /warn /spawncar"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 4:/goto /gethere /ajail /aunjail /giveweapon /akill /vr"),
SendClientMessage(playerid, 0xD8D8D8FF, "Admin Level 5:/makeadmin");
}
return 1;
}
COMMAND:makeadmin(playerid, params[])
{
    new id;
    new AdminLevel2;
    if(IsPlayerConnected(id))
    {
        if(PlayerInfo[playerid][AdminLevel] >= 5 || IsPlayerAdmin(playerid))
        {
            if(!sscanf(params, "ui", id, AdminLevel2))
            {
                if((AdminLevel2 >= 1 && AdminLevel2 <= 5) || AdminLevel2 == 0)
                {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(id, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "%s vam je dao Admina Level-a %d.", name, AdminLevel2);
                    SendClientMessage(id, 0xD8D8D8FF, string);
                    format(string, sizeof(string), "Dali ste Admina Level-a %d %s-u .", AdminLevel2, PlayerName);
                    SendClientMessage(playerid, 0xD8D8D8FF, string);
                    PlayerInfo[id][AdminLevel] = AdminLevel2;
                    return 1;
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Dostupni Leveli: 1, 2, 3, 4 i 5.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /makeadmin [IgracevID/DioImena] [AdminLevel]");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "Trebate RCON Admina da koristite ovu komandu!");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije Online.");
}
COMMAND:mute(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Nijemi ste od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Stavili ste igraca %s da bude nijem.", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
                ismuted[id] = true;
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /rmute [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije Online.");
}
COMMAND:unmute(playerid, params[])
{
    new id;
if(PlayerInfo[playerid][AdminLevel] >= 5)
{
    if(IsPlayerAdmin(playerid))
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Niste vise nijemi od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Igrac %s vise nije nijem.", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
                ismuted[id] = false;
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /runmute [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlašteni da koristite ovu komandu.");
}
COMMAND:ban(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Banovani ste od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Banovali ste %s .", id);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    Ban(id);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /ban [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:kick(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Izbaceni ste od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Izbacili ste %s .", id);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    Kick(id);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /kick [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:freeze(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
        new id;
        if(!sscanf(params, "u", id))
        {
            if(IsPlayerConnected(id))
            {
                new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    if(IsPlayerInRangeOfPoint(id, 20.0, X,Y,Z))
                {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(id, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "Zamrznuti ste od strane %s", name);
                    SendClientMessage(id, 0xD8D8D8FF, string);
                    format(string, sizeof(string), "Zamrznuo si %s", PlayerName);
                    SendClientMessage(playerid, 0xD8D8D8FF, string);
                    TogglePlayerControllable(id, 0);
                    return 1;
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Nisi u blizini Igraca.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /freeze [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
COMMAND:unfreeze(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >=1)
    {
        new id;
        if(!sscanf(params, "u", id))
        {
            if(IsPlayerConnected(id))
            {
                new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    if(IsPlayerInRangeOfPoint(id, 20.0, X,Y,Z))
                {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(id, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "Odmrznuti ste od strane %s", name);
                    SendClientMessage(id, 0xD8D8D8FF, string);
                    format(string, sizeof(string), "Odmrznuo si %s", PlayerName);
                    SendClientMessage(playerid, 0xD8D8D8FF, string);
                    TogglePlayerControllable(id, 1);
                    return 1;
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste u blizini Igraca.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /unfreeze [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
COMMAND:goto(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
if(!sscanf(params, "ui", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(id));
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "%s se teleportirao do tebe", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Teleportirao si se do %s .", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
    SetPlayerPos(playerid,x+2,y,z);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /goto [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:gethere(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
if(!sscanf(params, "ui", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid));
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "%s te teleportirao do njega.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Teleportirao %s do tebe.", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
    SetPlayerPos(id,x+2,y,z);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /gethere[IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:ajail(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Zatvoreni ste od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Zatvorili ste %s .", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerPos(id, 264.6288,77.5742,1001.0391);
    SetPlayerInterior(id, 3);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /rjail [IgracevID/DioImena]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:aunjail(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Oslobodjeni ste od strane %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "Oslobodili ste %s .", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerPos(id, 1555.097900, -1675.848754, 16.195312);
    SetPlayerInterior(id, 0);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "UPOTREBA: /runjail [PlayerId/PartOfName]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Niste ovlaÅ¡teni da koristite ovu komandu.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Igrac nije ONLINE.");
}
COMMAND:sethp(playerid, params[])
{
    new id;
    new hp;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
if(!sscanf(params, "ui", id, hp))
{
    if(hp <= 100)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Your Health Has Been Setted To %d By %s.", hp, name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Setted %s Health To %d.", PlayerName, hp);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerHealth(id, hp);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You can't set more than 100");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /rsethp [PlayerId/PartOfName] [Hp]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:setarmour(playerid, params[])
{
    new id;
    new armour;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
if(!sscanf(params, "ui", id, armour))
{
    if(armour <= 100)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Your Armour Has Been Setted To %d By %s.", armour, name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Setted %s Armour To %d.", PlayerName, armour);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerArmour(id, armour);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You can't set more than 100");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /rsetarmour [PlayerId/PartOfName] [Armour]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:setmoney(playerid, params[])
{
    new id;
    new ammount;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
if(!sscanf(params, "ui", id, ammount))
{
    if(ammount <= 10000000000)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "%s Has Given You %d.", name, ammount);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Gave %d Money To %s .", ammount, PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerMoney(id, ammount);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You can't give so much");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /money [PlayerId/PartOfName] [Ammount]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not admin 1338");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:givemoney(playerid, params[])
{
    new id;
    new ammount;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
if(!sscanf(params, "ui", id, ammount))
{
    if(ammount <= 10000000000)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "%s Has Given You %d.", name, ammount);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Gave %d Money To %s .", ammount, PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    GivePlayerMoney(id, ammount);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You can't give so much");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /money [PlayerId/PartOfName] [Ammount]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not admin 1338");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:setscore(playerid, params[])
{
    new id;
    new score;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
if(!sscanf(params, "ui", id, score))
{
    if(score <= 1000)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Your Score Has Been Setted To %d By %s.", score, name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Setted %s Score To %d.", PlayerName, score);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerScore(id, score);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You can't set more than 1000");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /setscore [PlayerId/PartOfName] [Score]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:getmoney(playerid, params[])
{
new id;
new money;
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
    if(!sscanf(params, "ui", id, money))
    {
        new string[64];
        new PlayerName[MAX_PLAYER_NAME];
        money = GetPlayerMoney(id);
        GetPlayerName(id, PlayerName, sizeof(PlayerName));
        format(string, sizeof(string), "%s has %d money.", id, money);
    SendClientMessage(id, 0xD8D8D8FF, string);
    return 1;
    }
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /getmoney [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
COMMAND:spawnplayer(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 1)
{
    new id;
    if(!sscanf(params, "u", id))
    {
        if(IsPlayerConnected(id))
        {
            new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "You have been spawned by %s ", name);
SendClientMessage(id, 0xD8D8D8FF, string);
format(string, sizeof(string), "You have spawn %s ", PlayerName);
SendClientMessage(playerid, 0xD8D8D8FF, string);
SpawnPlayer(id);
return 1;
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /spawnplayer [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command");
}
COMMAND:setint(playerid, params[])
{
    new id;
    new interior;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
if(!sscanf(params, "ui", id, interior))
{
    if(interior <= 100)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Your Interior Has Been Setted To %d By %s.", interior, name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Setted %s Interior To %d.", PlayerName, interior);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerInterior(id, interior);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Invalid Interior Id");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /setint [PlayerId/PartOfName] [Interior]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:setvw(playerid, params[])
{
    new id;
    new virtualworld;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
if(!sscanf(params, "ui", id, virtualworld))
{
    if(virtualworld <= 100)
    {
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "Your Virtual World Has Been Setted To %d By %s.", virtualworld, name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You Setted %s Virtual World To %d.", PlayerName, virtualworld);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerVirtualWorld(id, virtualworld);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Invalid Virtual World Id");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /setvw [PlayerId/PartOfName] [VirtualWorld]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:giveweapon(playerid, params[])
{
    new id;
    new weap;
    new ammo;
    if(IsPlayerConnected(id))
    {
        if(PlayerInfo[playerid][AdminLevel] >= 4)
        {
            if(!sscanf(params, "uii", id, weap, ammo))
            {
if(weap >= 1 && weap <= 46)
                {
                    if(ammo >= 1 && ammo <= 5000)
                    {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(id, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "%s has given You weapon %d with %d ammu.", name, weap, ammo);
                    SendClientMessage(id, 0xD8D8D8FF, string);
                    format(string, sizeof(string), "You gave weapon %d with %d ammu to %s .", weap, ammo, PlayerName);
                    SendClientMessage(playerid, 0xD8D8D8FF, string);
                    GivePlayerWeapon(id, weap, ammo);
                    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Max. Ammo is 5000");
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Invalid weapon id!");

            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /giveweapon[PlayerId/PartOfName] [WeaponId] [Ammo]"),
            SendClientMessage(playerid, 0xD8D8D8FF, "1(Brass) 2(Nite) 3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 9(Chainsaw) 10-13(Dildo)"),
            SendClientMessage(playerid, 0xD8D8D8FF, "14(Flowers) 15(Cane) 16(Grenades) 17(Teargas) 18(Molotovs) 22(Pistol) 23(SPistol) 24(Eagle)"),
            SendClientMessage(playerid, 0xD8D8D8FF, "25(Shotgun) 26(sawn-off) 27(Combat) 28(TEC9) 29(MP5) 30(AK47) 31(M4) 32(MAC10) 33(Country)"),
            SendClientMessage(playerid, 0xD8D8D8FF, "34(Sniper) 35(RPG) 37(Flamethrower) 38(Minigun) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "You Need Rcon Admin To Use This Command!");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Player Is Not Connected");
}
COMMAND:warn(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
if(!sscanf(params, "u", id))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "You have been warned by %s ", name);
SendClientMessage(id, 0xD8D8D8FF, string);
format(string, sizeof(string), "You have warn %s ", PlayerName);
SendClientMessage(playerid, 0xD8D8D8FF, string);
PlayerInfo[playerid][Warns] = PlayerInfo[playerid][Warns] +1;
return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /warn1 [PlayerId/PartOfName]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:getstats(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
    SendClientMessage(playerid, 0xD8D8D8FF, "Coming Soon!!");
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
COMMAND:spawncar(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
        new carid, carcolor1, carcolor2;
        if(!sscanf(params, "iii", carid, carcolor1, carcolor2))
        {
            if(carid >= 400 && carid <= 611)
            {
                if(carcolor1 >= 0 && carcolor1 <= 252)
                {
                    if(carcolor2 >= 0 && carcolor2 <= 252)
                    {
                        new Float:X, Float:Y, Float:Z;
                        GetPlayerPos(playerid, X, Y, Z);
                        CreateVehicle(carid, X+4, Y, Z, 10, carcolor1, carcolor2, 100);
                        SendClientMessage(playerid, 0xD8D8D8FF, "Vehicle Spawned");
                        return 1;
                    }
                    else return SendClientMessage(playerid, 0xD8D8D8FF, "Only color id's between 0 and 252 are avaliable.");
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Only color id's between 0 and 252 are avaliable.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "Only id's between 400 and 611 are avaliable.");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /spawncar [VehicleId] [Color 1][Color 2]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
COMMAND:akill(playerid, params[])
{
    new id;
if(IsPlayerConnected(id))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
if(!sscanf(params, "u", id))
{
    new string[64];
    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "You have been killed by %s.", name);
    SendClientMessage(id, 0xD8D8D8FF, string);
    format(string, sizeof(string), "You killed %s .", PlayerName);
    SendClientMessage(playerid, 0xD8D8D8FF, string);
    SetPlayerHealth(id, 0);
    return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /akill [PlayerId/PartOfName]");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
COMMAND:clearchat(playerid, params[])
{
for(new i = 0; i < 50; i++) SendClientMessageToAll(0x33FF33AA," ");
return 1;
}
COMMAND:vr(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][AdminLevel] >= 4)
    {
        if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xD8D8D8FF, "Vehicle Repaired.");
return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not in any vehicle");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}

u njemu ima i Admin System preveden oko 50% a evo i download od ovoga http://www.2shared.com/file/_YgHFBJ3/racun.html (btw ovo je samo FS od mog GM-a)
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Avgust 04, 2011, 07:03:02 PRE PODNE od Terza
Pravim web stranice za novac!
Osobni portofolio http:terza.com.ba/ !
Kontakt imate na stranici!