PARTNERI:

* Marketing

-UPOZORENJE-

Samo registrovani članovi mogu da vide/koriste forum u celini.
Prijavite se ili registrujte nalog na Balkan SA-MP forumu.


Autor Tema: [Pomoć] Unban i ban log help fast  (Pročitano 170 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže Jiky

Unban i ban log help fast
« poslato: April 14, 2019, 19:28:30 posle podne »
Problem(error/warning): /unban
Dio skripte:
Pawno Code: [Izaberi]
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;
}
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
T3XTDR4W5 <3
 

Na mreži Mister Naithan

Odg: Unban i ban log help fast
« Odgovor #1 poslato: April 14, 2019, 21:18:51 posle podne »
Pawno Code: [Izaberi]
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;
}

Credits : https://forum.sa-mp.com/showthread.php?t=349569
DeeJay - Music Producer
| EDM | MashUP | TRAP |


Give Honor To The One Who Deserve It


Respect For : androo | LoOdaK | Bašovski | Purdinho | Nikisb | Captain Foux | Vasic
 

Van mreže Jiky

Odg: Unban i ban log help fast
« Odgovor #2 poslato: April 14, 2019, 22:55:59 posle podne »
Pawno Code: [Izaberi]
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;
}

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

Na mreži Mister Naithan

Odg: Unban i ban log help fast
« Odgovor #3 poslato: April 14, 2019, 22:59:19 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 Mister Naithan »
DeeJay - Music Producer
| EDM | MashUP | TRAP |


Give Honor To The One Who Deserve It


Respect For : androo | LoOdaK | Bašovski | Purdinho | Nikisb | Captain Foux | Vasic
 

Van mreže Vasic

Odg: Unban i ban log help fast
« Odgovor #4 poslato: April 14, 2019, 23:05:21 posle podne »
Sad pisem preko fona, ako niko ne bude dao cmd do sutra, ja cu ti poslat.

Pawn Developing


Respect List: Mister Naithan | livinglikerockstar | Purdinho | RevOLvɘЯ.pwn | Captain Foux
 
Korisnici koji su se zahvalili: Mister Naithan

Na mreži livinglikearockstar

  • Ne treba vjerovati ljudima s kojima smo se tek sprijateljili, a koji pokazuju da smo im draži od njihovih starih prijatelja – tako će se ponašati i s nama kada steknu nove prijatelje.
  • Godfather
  • *
  • Poruke: 9601
  • Broj zahvalnica: 432
  • we create our own demons.
    • YouTube Channel
Odg: Unban i ban log help fast
« Odgovor #5 poslato: April 14, 2019, 23:50:41 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 livinglikearockstar »
 
Korisnici koji su se zahvalili: Mister Naithan