Deathrun VIP

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
User avatar
haciawo
Jau po truputį tampa savu
Posts: 103
Joined: 2013 Dec 03 00:03
Skype: lebronius74

Deathrun VIP

Post by haciawo »

Bėda noriu išimti is plugino kai kurios nereikalingus dalykus bet jis neturi cvar jokių( tiksliau keleta yra bet neatitinka )

Labai bučiau dėkingas jeigu kasnors iš šito plugino panaikintu .

Deagle pasirinkima
Nades Patch ( granatos )


Ir kad flagai butu ne "bti" - o "z"

Nes radau eilute tik kokiam flagui neatverti meniu.
Attachments
VIP_as.sma
(8.75 KiB) Downloaded 718 times
Image
http://WWW.EUROSTRIKE.EU COUNTER STRIKE SERVERS COMMUNITY
http://WWW.DATANET.LT - VIRTUALUS PRIVATUS SERVERIAI

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Deathrun VIP

Post by DYaGesS »

Code: Select all

#define DAMAGE_RECIEVED#include <amxmodx>#include <amxmisc>#include <cstrike>#include <fun>#include <sqlx>#include <nvault>#include <hamsandwich>#include <fakemeta>static const COLOR[] = "^x04" //greenstatic const CONTACT[] = ""new maxplayersnew gmsgSayTextnew mpd, mkb, mhbnew g_MsgSyncnew health_addnew health_hs_addnew health_maxnew nKillernew nKiller_hpnew nHp_addnew nHp_maxnew gInvisPercentCT;new gInvisPercentT;new g_menu_active #define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<9) // Keys: 1234567890new round = 1#if defined DAMAGE_RECIEVED    new g_MsgSync2#endif public plugin_init(){    register_plugin("VIP for DeathRun", "2.03", "Audrius(Tickle)")    mpd = register_cvar("money_per_damage","100")    mkb = register_cvar("money_kill_bonus","5000")    mhb = register_cvar("money_hs_bonus","1000")    health_add = register_cvar("amx_vip_hp", "15")    health_hs_add = register_cvar("amx_vip_hp_hs", "30")    health_max = register_cvar("amx_vip_max_hp", "100")    g_menu_active = register_cvar("menu_active", "1")     register_event("Damage","Damage","b")    register_event("DeathMsg","death_msg","a")    register_logevent("logevent_Round_Start", 2, "1=Round_Start");    register_event("DeathMsg", "hook_death", "a", "1>0")     maxplayers = get_maxplayers()     register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")     g_MsgSync = CreateHudSyncObj() #if defined DAMAGE_RECIEVED    g_MsgSync2 = CreateHudSyncObj()#endif    register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")    register_logevent("logevent_Round_Start", 2, "1=Round_Start")    register_clcmd("awp","HandleCmd")        register_clcmd("sg550","HandleCmd")        register_clcmd("g3sg1","HandleCmd")        register_event("CurWeapon", "event_CurWeapon", "be", "1=1")        register_event("CurWeapon", "event_CurWeaponn", "be", "1=1")        register_event("CurWeapon", "event_CurWeaponnn", "be", "1=1")    register_clcmd("say /vip","ShowMotd")    maxplayers = get_maxplayers()    gmsgSayText = get_user_msgid("SayText")    gInvisPercentCT = register_cvar( "deathrun_invisibility_percentageCT", "0" );    gInvisPercentT = register_cvar( "deathrun_invisibility_percentageT", "200" );    register_clcmd("say", "handle_say")    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)} public on_damage(id){    new attacker = get_user_attacker(id) #if defined DAMAGE_RECIEVED    // id should be connected if this message is sent, but lets check anyway    if ( is_user_connected(id) && is_user_connected(attacker) )    if (get_user_flags(attacker) & ADMIN_CHAT)    {        new damage = read_data(2)         set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)        ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)#else    if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_USER) )    {        new damage = read_data(2)#endif        set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)        ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)    }}  public resetModel(id, level, cid) {if (get_user_flags(id) & ADMIN_CVAR) {new CsTeams:userTeam = cs_get_user_team(id)if (userTeam == CS_TEAM_T) {cs_set_user_model(id, "smith")}else if(userTeam == CS_TEAM_CT) {cs_set_user_model(id, "smith")}else {cs_reset_user_model(id)}} return PLUGIN_CONTINUE} public Damage(id){    new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)    if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)    if (get_user_flags(attacker) & ADMIN_USER)     {        new money = read_data(2) * get_pcvar_num(mpd)        if(hitpoint==1) money += get_pcvar_num(mhb)        cs_set_user_money(attacker,cs_get_user_money(attacker) + money)    }} public death_msg(){    if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)} public logevent_Round_Start(){    round++;    new players[32], player, pnum;    get_players(players, pnum, "a");    for(new i = 0; i < pnum; i++)    {        player = players[i];        if(get_user_flags(player) & ADMIN_USER)        {        set_user_health(player, 150)        give_item(player, "item_kevlar");        give_item(player, "item_assaultsuit");        give_item(player, "item_thighpack");        if (!get_pcvar_num(g_menu_active))            return PLUGIN_CONTINUE        if(round > 1) Showrod(player)        }    }    return PLUGIN_HANDLED} public hook_death(){   // Killer id   nKiller = read_data(1)      if ( (read_data(3) == 1) && (read_data(5) == 0) )   {      nHp_add = get_pcvar_num (health_hs_add)   }   else      nHp_add = get_pcvar_num (health_add)   nHp_max = get_pcvar_num (health_max)   // Updating Killer HP   if(!(get_user_flags(nKiller) & ADMIN_USER))   return;    nKiller_hp = get_user_health(nKiller)   nKiller_hp += nHp_add   // Maximum HP check   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max   set_user_health(nKiller, nKiller_hp)   // Hud message "Healed +15/+30 hp"   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)   // Screen fading   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)   write_short(1<<10)   write_short(1<<10)   write_short(0x0000)   write_byte(0)   write_byte(0)   write_byte(200)   write_byte(75)   message_end() } public Showrod(id) {    show_menu(id, Keysrod, "Nemokamos VIP privilegijos^n\w1. Geresne Gravitacija ^n\w2. 255(HP ir Armor)^n\w3. Money(10.000)^n\w4. 5HP/s^n\w5. Invisibility(T)^n0. Exit^n", -1, "rod") // Display menu}public Pressedrod(id, key) {    /* Menu:    * VIP Menu    * 1. "Geresne Gravitacija"    * 2. "255(HP ir Armor)"    * 3. "Money(10.000)"    * 4. "5HP/s"    * 5. "Invisibility(T)"    * 0. Exit    */     new team[32], User[32];    get_user_team(id,team,32);    get_user_name(id,User,32);    switch (key) {        case 0: {             set_user_gravity( id, 0.5)            }            case 1: {     set_user_health( id, 255)    set_user_armor( id, 255)            }        case 2: {            cs_set_user_money(id, cs_get_user_money(id) + 10000);            }         case 3: {                         if(is_user_alive(id))            {                new hp = get_user_health(id);                                if(hp < 200)                {                    set_task(1.0,"gyogyitas", id)                }            }            }        case 4: {     if(equal(team,"T", 1))    {        set_user_rendering( id, get_pcvar_num( gInvisPercentT ) );    }       else    {        set_user_rendering( id, get_pcvar_num( gInvisPercentCT ) );    }    }           case 9: { // 0                    }    }    return PLUGIN_CONTINUE} public gyogyitas(id) {        new hp = get_user_health(id);        if(hp < 200)    {        set_user_health(id, hp + 5);        set_task(1.0,"gyogyitas", id);    }    else    {        client_print(id, print_chat, "Daugiau HP nebegausi :)", hp)        return PLUGIN_HANDLED;    }        return PLUGIN_CONTINUE;}  public ShowMotd(id){ show_motd(id, "vip.txt")}public client_authorized(id){ set_task(30.0, "PrintText" ,id)}public PrintText(id){ client_print(id, print_chat, "[VIP] Rasyk /vip, jai nori suzinoti ka gali vip statusa turintis zaidejas ir kiek tai kainuoja.")} public handle_say(id) {    new said[192]    read_args(said,192)    if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )        set_task(0.1,"print_adminlist",id)    return PLUGIN_CONTINUE} public print_adminlist(user) {    new adminnames[33][32]    new message[256]    new contactinfo[256], contact[112]    new id, count, x, len        for(id = 1 ; id <= maxplayers ; id++)        if(is_user_connected(id))            if(get_user_flags(id) & ADMIN_USER)                get_user_name(id, adminnames[count++], 31)     len = format(message, 255, "%s VIP ONLINE: ",COLOR)    if(count > 0) {        for(x = 0 ; x < count ; x++) {            len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")            if(len > 96 ) {                print_message(user, message)                len = format(message, 255, "%s ",COLOR)            }        }        print_message(user, message)    }    else {        len += format(message[len], 255-len, "No VIP online.")        print_message(user, message)    }        get_cvar_string("amx_contactinfo", contact, 63)    if(contact[0])  {        format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)        print_message(user, contactinfo)    }} print_message(id, msg[]) {    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)    write_byte(id)    write_string(msg)    message_end()}  
mėgink :)
Padėjau? +rep

User avatar
haciawo
Jau po truputį tampa savu
Posts: 103
Joined: 2013 Dec 03 00:03
Skype: lebronius74

Re: Deathrun VIP

Post by haciawo »

Kaip ir neina plugina sucomplino. Isidėjau, bet išvis dabar jokios lenteles neišmeta. Nors per cvars rodo kad meniu ijungtas.

Gal prie flagu ziurėjai kanors ??
Image
http://WWW.EUROSTRIKE.EU COUNTER STRIKE SERVERS COMMUNITY
http://WWW.DATANET.LT - VIRTUALUS PRIVATUS SERVERIAI

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Deathrun VIP

Post by DYaGesS »

spėju, kad tu z raidės neturi, dėl to...
Padėjau? +rep

User avatar
haciawo
Jau po truputį tampa savu
Posts: 103
Joined: 2013 Dec 03 00:03
Skype: lebronius74

Re: Deathrun VIP

Post by haciawo »

Gali buti as ziurėjau accesus flagu. as noriu kad sitas vipas butu visiems . Kaip tai padaryti ?

Ta prasme: Free vipas .
Image
http://WWW.EUROSTRIKE.EU COUNTER STRIKE SERVERS COMMUNITY
http://WWW.DATANET.LT - VIRTUALUS PRIVATUS SERVERIAI

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Deathrun VIP

Post by DYaGesS »

free vipas, tai reikėjo iškart taip sakyt.. amxx.cfg nustatai flag ne z, o bit ir reikėjo tada iš taviškio kodo tik 2pasirinkimus pašalint..
Padėjau? +rep

User avatar
haciawo
Jau po truputį tampa savu
Posts: 103
Joined: 2013 Dec 03 00:03
Skype: lebronius74

Re: Deathrun VIP

Post by haciawo »

Paaiskinsiu situacija.
Sitas vip pluginas bus
1lygio vip kuris bus nemokamas

o serveri yra kitas daug daugiau pasirinkimu turintis vip pluginas bus 2lygio vip mokamas.

Ir as noriu kad nebutu tentu dviejų pasirinkimu ir kad. Tarkim naujas zaidėjas turi free vipa o kai uzsako kita vip kad dingtu tas free ( ta moku pasidares esu ) kad nemestu leneteles kai žaidėjas turi flaga ADMIN_CHAT.

-- 2014 Kov 14 14:29 --

Bit negaliu dėti . Nes tada pradės mesti tai ta tai kita plugino meniu.. Man reikia kad vienas dingtu kai uzsakomas yra kitas.

Sitas pluginas turėtu buti visiems. ( Nezinau kaip )
Bet bit priv negaliu dėti .
Image
http://WWW.EUROSTRIKE.EU COUNTER STRIKE SERVERS COMMUNITY
http://WWW.DATANET.LT - VIRTUALUS PRIVATUS SERVERIAI

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Deathrun VIP

Post by DYaGesS »

Tai tiesiog visur ištrink va tokius dalykus, kaip tikrinimus dėl flagų: if(get_user_flags(player) & ADMIN_USER)
Padėjau? +rep

User avatar
haciawo
Jau po truputį tampa savu
Posts: 103
Joined: 2013 Dec 03 00:03
Skype: lebronius74

Re: Deathrun VIP

Post by haciawo »

Padariau. Dabar visi turi šita menių.

Kaip padaryti kad šito menių nematytu tarkim adminas ?
Image
http://WWW.EUROSTRIKE.EU COUNTER STRIKE SERVERS COMMUNITY
http://WWW.DATANET.LT - VIRTUALUS PRIVATUS SERVERIAI

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Deathrun VIP

Post by DYaGesS »

Code: Select all

if !(get_user_flags(player) & ADMIN_BAN) // nesu tikras, bet gali tikrint man regis taip tarkim ar neturi tam tikro flag
Padėjau? +rep

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests