Please help with FS
#1

Hi. Sorry for my gramma.
I realy need you help. I have samp-bans FS and only RCON ADMINS can ban. I need to make the simple admins can ban. There is FS: http://samp-bans.com/downloads/sampban.pwn
Please help.
Reply
#2

Please upload the code here inside or upload to http://pastebin.com/
Reply
#3

http://pastebin.com/Jf7ssw6J There's a code
Reply
#4

please define what you mean by "simple admin"?
Reply
#5

You don't have admins variables :/
You must add an enum that includes vars you'll need like registred,logged,admin level...etc
Here's an example:
pawn Код:
enum pInfo
{
    pRegistered,
    pLogged,
    pAdmin,
    pKills,
    pDeaths    
}

new PlayerInfo[MAX_PLAYERS][pInfo];
Then add a rcon commad that set players admin level :

pawn Код:
YCMD:setlevel(playerid,params[],help)
{
    if(PlayerInfo[playerid][pAdmin] >= 5 || IsPlayerAdmin(playerid))
    {
        new targetid,type,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "Player not connected.");
        if(sscanf(params, "ui", targetid, type)) return SendClientMessage(playerid, C_RED, "/setlevel [playerid] [level 0-5]");
        {
            if(type < 0 || type > 5) return SendClientMessage(playerid, C_RED, "Invalid level.");
            format(sendername, sizeof(sendername), "%s", Name(playerid));
            format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
            PlayerInfo[targetid][pAdmin] = type;
            format(string, sizeof(string),"%s has promoted %s to Admin-Level %d.", sendername, giveplayer, type);
            SendClientMessageToAll(C_CYAN,string);
        }
    }
    else return SendClientMessage(playerid, C_RED,"You are not authorised to use this command");
    return 1;
}
Then you'll use this :

For admin +lv1 = if(PlayerInfo[playerid][pAdmin] >= 1)
For admin +lv2 = if(PlayerInfo[playerid][pAdmin] >= 2)
For admin +lv3 = if(PlayerInfo[playerid][pAdmin] >= 3)
...etc

Код:
Note: This is YCMD commands processor, change it if you use another one.
Reply
#6

My variables is adminlvl3; adminlvl4; savininkas.
And i can't understand, where i need put them all exacly. Sorry for my questions, but i am a lit a bit green in FS.
Reply
#7

I think that your gamemode includes admin variables :/
So you have to past the code on your gamemode or make an include like LuxAdmin include (so you can use admin vars)
Reply
#8

How make that FS on gamemode?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)