Page 1 of 1

pagalbos pakeisti iš user_kill į amx_ban

Posted: 2016 Jan 04 15:29
by laimiukas3
pagalbos pakeisti iš user_kill į amx_ban


ar tai butu kazkokas tokio case 4: server_cmd("amx_ban 30 %s ^"%d STOP KILLING HOSTAGES IDIJOT!^", attacker, name); ? neveikia

Code: Select all

#include amxmisc#include fakemeta new warningpoint[33]new client, mapname[4] static const Etape[][] ={    "Spawn with 70 hp",    "Spawn with 40 hp",    "Spawn with 1 hp",    "IDIJOT BANNED"} public plugin_init(){   get_mapname(mapname,3)    if (!equali(mapname,"cs_",3))   pause("a")    register_event("TextMsg","host_killed","b","2&#Killed_Hostage")    register_event("HLTV", "event_new_round", "a", "1=0", "2=0")  } public client_connect(id){    warningpoint[id] = 0}  public host_killed(attacker) {    new name[32]    get_user_name(attacker, name, charsmax(name))     set_hudmessage(255, 0, 0, 0.05, 0.45, 1, 0.0, 2.0, 1.0, 1.0, -1)    ShowSyncHudMsg(0, CreateHudSyncObj(), "%s Killed hostage!^nPunish: %s", name, Etape[warningpoint[attacker]])    client_print(attacker, print_center, "+1 Warning points")    warningpoint[attacker]++} public event_new_round(){    new players[32], num    get_players(players, num)     for(new id = 0; id < num; id++)    {        client = players[id]        set_task(0.1, "updateclient", client)    }    return PLUGIN_CONTINUE}  public updateclient(id){        if(!is_user_connected(id) && !is_user_alive(id)) return;                switch(warningpoint[id])        {           case 1: set_pev(id, pev_health, 70.0)           case 2: set_pev(id, pev_health, 40.0)           case 3: set_pev(id, pev_health, 1.0)           //case 4: user_kill(id ,1)           case 4: server_cmd("amx_ban 30 %s ^"%d STOP KILLING HOSTAGES IDIJOT!^"" // kas toliau kaip cia su tuo id kad banintu buten ta zmogu kuris pasieke 4 ispejimus? :)                              }        warningpoint[id] = 0}

Re: pagalbos pakeisti iš user_kill į amx_ban

Posted: 2016 Jan 04 18:14
by InvIs2

Code: Select all

server_cmd("amx_ban 30 #%d ^"STOP KILLING HOSTAGES IDIJOT!^"", get_user_userid(id))

Re: pagalbos pakeisti iš user_kill į amx_ban

Posted: 2016 Jan 04 21:14
by laimiukas3
InvIs2 wrote:

Code: Select all

server_cmd("amx_ban 30 #%d ^"STOP KILLING HOSTAGES IDIJOT!^"", get_user_userid(id))
gyveni ir mokaisi as Tautvio plugina afk ban nagrinejau vis ir galvojau taip daryti bet poto galvojau kad kazkas turetu buti priskirta is pacio kodo pagal ka tikrina taip lengvai neveiks o pasirodo veiks aciu :)