Jump to content
  • 0

pomoc Příkaz


Stellet

Dotaz

Ahoj udělal jsem si do modu /pk id duvod.. Ale když to dám tak to i zapíše do configu ale nenapíše mu to ten text.. Tak prosím o pomoc:

dcmd_pk(playerid, params[])
{
    new ID;
    new DUVOD[500];
    if(Hrac[playerid][AdminLevel] <= 4) return SendClientMessage(playerid, -1, "Nejsi Administrátor!");
    {
        if(sscanf(params, "is", ID, DUVOD)) return SendClientMessage(playerid, -1, "Použití: /pk [ID] [DŮVOD]");
        {
            new str[300];
            new Name[64];
            GetPlayerName(playerid, Name, 64);
            new Name1[64];
            GetPlayerName(ID, Name1, 64);
            format(str, 300, "Hráč %s byl zabit PK'ed Administrátorem %s. [Důvod: %s]", Name, Name1, DUVOD);
            SendClientMessageToAll(COLOR_RED, str);
            Hrac[playerid][PK] = 1;
            Kick(playerid);
        }
    }
    return 1;
}

Screen co to udělá ve hře:

dm-9142721500613.png


Jen ho to prostě kickne.

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor

údajně má funkce ban a kick zvýšenou prioritu co se tu snad jednou řešilo, je to novinka od nové verze takže mě napadá jak to pošmelit:

místo Kick(id);

 

if(IsPlayerConnected(id)) return Kick(id);

 

a když by to nešlo tak přes timer ... 

Link to comment
Share on other sites

  • 0

Kamo zle to maš kukni tu =D maš to tu skus to cele musi to isť :)

Mal si to tam cele zle s tymi IDčkami ale ak maš na mysli tu spravu ktoru nevidiš tak to robi ten skorí kick hodim ti tu aj funkciu ak chceš nieje moja ale

dcmd_pk(playerid, params[])
{
    new ID,DUVOD[128],str[128];
    if(Hrac[playerid][AdminLevel] <= 4) return SendClientMessage(playerid, -1, "Nejsi Administrátor!");
    if(sscanf(params, "is", ID, DUVOD)) return SendClientMessage(playerid, -1, "Použití: /pk [ID] [DŮVOD]");
    new Name[24],[24];
    GetPlayerName(playerid, Name, 24);
    GetPlayerName(ID, Name1, 24);
    format(str, 128, "Hráč %s byl zabit PK'ed Administrátorem %s. [Důvod: %s]", Name1, Name, DUVOD);
    SendClientMessageToAll(COLOR_RED, str);
    Hrac[ID][PK] = 1;
    Kick(ID);
    return 1;
}
Edited by Paulo*
Link to comment
Share on other sites

  • 0

 

Kamo zle to maš kukni tu =D maš to tu skus to cele musi to isť :)

Mal si to tam cele zle s tymi IDčkami ale ak maš na mysli tu spravu ktoru nevidiš tak to robi ten skorí kick hodim ti tu aj funkciu ak chceš nieje moja ale

dcmd_pk(playerid, params[])
{
    new ID,DUVOD[128],str[128];
    if(Hrac[playerid][AdminLevel] <= 4) return SendClientMessage(playerid, -1, "Nejsi Administrátor!");
    if(sscanf(params, "is", ID, DUVOD)) return SendClientMessage(playerid, -1, "Použití: /pk [ID] [DŮVOD]");
    new Name[24],[24];
    GetPlayerName(playerid, Name, 24);
    GetPlayerName(ID, Name1, 24);
    format(str, 128, "Hráč %s byl zabit PK'ed Administrátorem %s. [Důvod: %s]", Name1, Name, DUVOD);
    SendClientMessageToAll(COLOR_RED, str);
    Hrac[ID][PK] = 1;
    Kick(ID);
    return 1;

Snad půjde

Nejde, ukážete mi někdo jak přes ten timer pls ? :(

Oprava: Hotovo udělal jsem to díky všem :)

Edited by FeedBoss
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...