Unban i ban log help fast

Započeo Jiky, April 14, 2019, 19:28:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): /unban
Dio skripte: [pawn]CMD:ban(playerid, params[])
{
    new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"[SERVER]: {FF0000}SAMO ADMIN!");
    if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "[KORISTI]: {00B7FF}/ban [IME/ID] [Razlog]");
    GetPlayerName(id, banned, sizeof(banned));
    format(string, sizeof(string), "{FFFFFF}[SERVER]: %s {00B7FF}je banovan od strane {FF0000}%s. {FFFFFF}razlog: %s", banned, GetName(playerid), reason);
    SendClientMessageToAll(COLOR_WHITE, string);
    BanEx(id, reason);
    return 1;
}

stock GetName(playerid)
{
    new
        pName[MAX_PLAYER_NAME];

    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema(obavezno ako je ingame problem): //

Zelim napraviti ban log + unban cmd , neko help? , koristim zcmd,sscanf2 i a_samp

[pawn]CMD:unban(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128];
        if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unban [playername]");

        if( PlayerInfo[playerid][pBan] >= 1 )
        {
            PlayerInfo[playerid][pBan] = 0;
            print("OnPlayerOfflineLogin: Variables saved properly");
            format(string, 128, "[ADMIN] %s (IP:%s) was unbanned by %s.", params, PlayerInfo[playerid][pIP], GetPlayerNameEx(playerid));
            SendStaffMessage(COLOR_RED,string);
            new year, month,day;
            getdate(year, month, day);
            new playa[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playa, MAX_PLAYER_NAME);
            format(string, sizeof(string), "[ADMIN] %s : was unbanned by %s.", params, playa);
            SendStaffMessage(COLOR_RED, string);
        }
        else
        {
            SendClientMessage( playerid, COLOR_WHITE, "Not a banned account or no such account was found!" );
        }
    }
    return 1;
}[/pawn]

Credits : https://forum.sa-mp.com/showthread.php?t=349569




Give Honor To The One Who Deserve It





Citat: Mister Naithan poslato April 14, 2019, 21:18:51 POSLE PODNE
[pawn]CMD:unban(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128];
        if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unban [playername]");

        if( PlayerInfo[playerid][pBan] >= 1 )
        {
            PlayerInfo[playerid][pBan] = 0;
            print("OnPlayerOfflineLogin: Variables saved properly");
            format(string, 128, "[ADMIN] %s (IP:%s) was unbanned by %s.", params, PlayerInfo[playerid][pIP], GetPlayerNameEx(playerid));
            SendStaffMessage(COLOR_RED,string);
            new year, month,day;
            getdate(year, month, day);
            new playa[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playa, MAX_PLAYER_NAME);
            format(string, sizeof(string), "[ADMIN] %s : was unbanned by %s.", params, playa);
            SendStaffMessage(COLOR_RED, string);
        }
        else
        {
            SendClientMessage( playerid, COLOR_WHITE, "Not a banned account or no such account was found!" );
        }
    }
    return 1;
}[/pawn]

Credits : https://forum.sa-mp.com/showthread.php?t=349569
nemam ja admin system , mozes napraviti za rcon admin , probo sam i nece

Citat: Jiky poslato April 14, 2019, 22:55:59 POSLE PODNE
nemam ja admin system , mozes napraviti za rcon admin , probo sam i nece

Ja nisam skripter , ja se bavim Fixanjem . . .

@Vasic ako je rad , eto  8)




Ako ti sve budu drugi radili , nikad nauciti neces  8)
Poslednja Izmena: April 14, 2019, 23:00:26 POSLE PODNE od Mister Naithan




Give Honor To The One Who Deserve It





Sad pisem preko fona, ako niko ne bude dao cmd do sutra, ja cu ti poslat.
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Jiky poslato April 14, 2019, 22:55:59 POSLE PODNE
nemam ja admin system , mozes napraviti za rcon admin , probo sam i nece
if(PlayerInfo[playerid][pAdmin] >= 2) > if(IsPlayerAdmin(playerid))

i sve zavisi kako ti čuvaš banove, tu resetuje pBan u igračevom fajlu i to resetuje onom ko je kucao...
Poslednja Izmena: April 14, 2019, 23:51:56 POSLE PODNE od livinglikearockstar