pagalbos pakeisti iš user_kill į amx_ban

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

pagalbos pakeisti iš user_kill į amx_ban

Post 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}
Image
Image
Image

InvIs2
Jau po truputį tampa savu
Posts: 149
Joined: 2013 Sep 29 12:47
Skype: pksoldierlt

Re: pagalbos pakeisti iš user_kill į amx_ban

Post by InvIs2 »

Code: Select all

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

User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Re: pagalbos pakeisti iš user_kill į amx_ban

Post 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 :)
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests