Modificare plugin VIP

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

31 Dec 2013, 18:44

Imi poate modfica acest plugin in asa fel in care sa fie intr-un meniu care cand dai /vmenu sa te intrebe:
Activez puterile de VIP?
1.Da
2.Nu
Iar daca nu are flagul de acces setat in plugin sa zica doar VIP poate folosi meniul!
Flagul de acces sa ramana cel setat acolo
Plugin de modificat | Afiseaza codul
[code]#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>

#define PLUGIN "Knife_VIP"
#define VERSION "1.0"
#define AUTHOR "BS"

#define VIP_CHECK ADMIN_LEVEL_H
#define ADMIN_VIP ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

enum { 
    SCOREATTRIB_ARG_PLAYERID = 1, 
    SCOREATTRIB_ARG_FLAGS 
}; 

enum ( <<= 1 ) { 
    SCOREATTRIB_FLAG_NONE = 0, 
    SCOREATTRIB_FLAG_DEAD = 1, 
    SCOREATTRIB_FLAG_BOMB, 
    SCOREATTRIB_FLAG_VIP 
}; 

new pCvar_AdminVIP; 
new maxplayers
new gmsgSayText
new vip_bombe
new vip_hp
new vip_dosao
new vip_boja_huda
new vip_gravitacija
new vip_brzina
new vip_skin

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    RegisterHam(Ham_Spawn, "player", "Spawn", 1)
    
    vip_bombe = register_cvar("vip_bombe","1")
    vip_hp = register_cvar("vip_hp","50")
    vip_dosao = register_cvar("vip_connect","1")
    vip_boja_huda = register_cvar("vip_mesaj_hud","1")
    pCvar_AdminVIP = register_cvar( "amx_adminvip", "1" );
    vip_gravitacija = register_cvar("vip_gravity","0.4")
    vip_brzina = register_cvar("vip_viteza","700.0")
    vip_skin = register_cvar("vip_skin","1")
    
    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
    register_clcmd("say", "handle_say")
    
    maxplayers = get_maxplayers()
    register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" ); 
    gmsgSayText = get_user_msgid("SayText")
    
    register_event("ResetHUD", "resetModel", "b")
    register_event("CurWeapon", "eCurWeapon", "be", "1=1");
    
    maxplayers = get_maxplayers()
}

public plugin_precache() {
    precache_model("models/player/vipt/vipt.mdl")
    precache_model("models/player/vipct/vipct.mdl")
}

public resetModel(id)
{
    if(get_pcvar_num(vip_skin) == 1)
        return PLUGIN_CONTINUE;
    
    if(is_user_connected(id) && is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
    {
        switch(cs_get_user_team(id))
        {
            case CS_TEAM_T:
                cs_set_user_model(id, "vipt");
            case CS_TEAM_CT:
                cs_set_user_model(id, "vipct");
        }
    }
    return PLUGIN_CONTINUE;
}

public Spawn(id)
{
    if(is_user_connected(id) && is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
    {
        switch(get_pcvar_num(vip_bombe))
        {
            case 1:
            {
                give_item(id,"weapon_hegrenade")
                give_item(id,"weapon_smokegrenade")
                give_item(id,"weapon_flashbang")
            }
            case 0:
                return PLUGIN_CONTINUE;
        }
        
        set_user_health(id,get_user_health(id) + get_pcvar_num(vip_hp))
        set_user_maxspeed(id, get_user_maxspeed(id) + get_pcvar_float(vip_brzina))
        set_user_gravity(id, get_user_gravity(id) - get_pcvar_float(vip_gravitacija))
    }
    return PLUGIN_HANDLED;
}

public eCurWeapon(id)
{
    CheckSpeed(id);
    return PLUGIN_CONTINUE;
}

public CheckSpeed(id)
    set_user_maxspeed(id, get_user_maxspeed(id) + get_pcvar_num(vip_brzina));

public client_putinserver(id)
{
    set_task(3.0,"vip_doso",id)
}

public vip_doso(id)
{
    if(is_user_connected(id))
    {
        if(get_user_flags(id) & ADMIN_LEVEL_H)
        {
            if(is_user_connected(id))
                if(get_pcvar_num(vip_dosao) == 0)
                return PLUGIN_HANDLED
            new name[32]
            get_user_name(id, name, 31)
            if(get_pcvar_num(vip_boja_huda) == 1)
            {
                set_hudmessage(255, 0, 0, 0.06, 0.73, 0, 6.0, 12.0) //crvema
                show_hudmessage(0, "VIP %s se conecteaza",name)
            }
            if(get_pcvar_num(vip_boja_huda) == 2)
            {
                set_hudmessage(0, 255, 0, 0.06, 0.73, 0, 6.0, 12.0) //zelena
                show_hudmessage(0, "VIP %s se conecteaza",name)
            }
            if(get_pcvar_num(vip_boja_huda) == 3)
            {
                set_hudmessage(0, 255, 255, 0.06, 0.73, 0, 6.0, 12.0) //plava
                show_hudmessage(0, "VIP %s se conecteaza",name)
            }
            return PLUGIN_HANDLED
        }
        return PLUGIN_HANDLED
    }
    return PLUGIN_HANDLED
}

public handle_say(id) {
    new said[192]
    read_args(said,192)
    if( ( containi(said, "vips") != -1 && containi(said, "vip") != -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) & VIP_CHECK)
        get_user_name(id, adminnames[count++], 31)
    
    len = format(message, 255, "%s VIP-uri 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, "Nici un VIP online")
        print_message(user, message)
    }
    
    get_cvar_string("amx_contactinfo", contact, 63)
    if(contact[0])  {
        format(contactinfo, 111, "%s Contact Server Vip -- %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()
}

public MessageScoreAttrib( iMsgId, iDest, iReceiver ) { 
    if( get_pcvar_num( pCvar_AdminVIP ) ) { 
        new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID ); 
        
        if( access( iPlayer, ADMIN_VIP ) ) { 
            set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP ); 
        } 
    } 
}[/code]
BHOP.FREAKZ.RO
Image
Rapidserver
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

31 Dec 2013, 22:52

Va rog stiu ca incalc regulamentul dar am nevoie de el :(
BHOP.FREAKZ.RO
Image
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

01 Jan 2014, 20:34

Careva din cei 20+ care au vazut topicu va rog? :((
BHOP.FREAKZ.RO
Image
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

02 Jan 2014, 21:17

Careva??? :|
BHOP.FREAKZ.RO
Image
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 10:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times
Contact:

02 Jan 2014, 22:28

Tot pluginul sau numai anumite parti din el ?
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

02 Jan 2014, 22:47

Pai sa-ti explic eu vreau mai pe scrut un plugin care sa dea un super knife la vip cu 600 speed , 400 gravity , damage x3 , regenerare HP +30 pana la 600 doar cand are cutitu
BHOP.FREAKZ.RO
Image
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 10:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times
Contact:

02 Jan 2014, 23:18

Vrei sa il primeasca la Spawn sau sa fie un meniu ?
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

03 Jan 2014, 22:11

Un meniu bagi butiu ala in /vm si pe langa daca poti adaug si hook :D
BHOP.FREAKZ.RO
Image
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

08 Jan 2014, 15:31

UP! Va rog :( as face eu dar nu stiu cum sa pun viteza si gravitatea doar cand are cutit...
BHOP.FREAKZ.RO
Image
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2446
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 255 times
Been thanked: 281 times
Contact:

08 Jan 2014, 16:15

Ba moderatori, voi nu vedeti unde fac astia cereri :O ?
Last edited by munir on 09 Jan 2014, 13:55, edited 1 time in total.
Reason: Ai primit avertisment pentru offtopic. (btw, nu, nu vad, imi arati tu?)
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
SimplyClever
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 21 Jul 2013, 16:20
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

08 Jan 2014, 17:38

Bine ca mai faci si tu post hunt ... ma bucuram si eu ca mi-o raspuns cineva la topic si cand colo tu cu post hunt =D> eu am facut cererea unde trbuia daca nu sti mai bine taci :-j L-)
BHOP.FREAKZ.RO
Image
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2446
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 255 times
Been thanked: 281 times
Contact:

09 Jan 2014, 13:45

SimplyClever wrote:Bine ca mai faci si tu post hunt ... ma bucuram si eu ca mi-o raspuns cineva la topic si cand colo tu cu post hunt =D> eu am facut cererea unde trbuia daca nu sti mai bine taci :-j L-)
Nu tac! @-)

Pentru ca exista o anumita categorie unde se fac cereri / modificari:
http://www.extreamcs.com/forum/modifica ... nuri-f159/
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests