Vip
Results 1 to 3 of 3

Thread: Vip

  1. #1
    Junior Member Array
    Join Date
    Nov 2017
    Karma
    0

    Default Vip

    Pozz... Ako neko moze da mi napravi VIP plugin za PUB mod Nijedan VIP plugin mi ne radi na server,kad god ubijes nekog igraca srw pada,
    pa zato ako neko ima volje da mi napravi bicu mu zahvalan
    VIP hocu da sodrzi:
    +5 hp za svako ubistvo
    +500$ za svako ubistvo
    Armor na pocetku
    Da ma prefix na catu i na tab
    Manju gravitaciju
    Da dobija 2x jump
    Kad kucas /vips da ispise sve vipove koje su na serveru
    Kad kucas /vipinfo da izadje izadju permisije vipa

    Hvala unapred

  2. #2
    Senior Member Array
    Join Date
    May 2014
    Location
    Mamica
    Karma
    0

    Default

    Code:
    /* Plugin generated by AMXX-Studio */
    
    #include <amxmodx>
    #include <amxmisc>
    #include <hamsandwich>
    #include <fun>
    #include <cstrike>
    #include <engine>
    
    #define PLUGIN "New Plug-In"
    #define VERSION "1.0"
    #define AUTHOR "author"
    
    #define IMA_VIP_FLAG ADMIN_LEVEL_H
    
    new jumpnum[33] = 0
    new bool:dojump[33] = false
    
    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 cvar_armor;
    new cvar_gravitacija;
    new cvar_hp_ubistvo;
    new cvar_pare_ubistvo;
    new ako_je_vip;
    
    new maxplayers
    new gmsgSayText
    
    public plugin_init() {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    	
    	register_event("DeathMsg", "Mrtav", "a");
    	
    	register_clcmd("say", "handle_say");
    	
    	cvar_armor = register_cvar("armor_na_pocetku", "1");
    	cvar_gravitacija = register_cvar("gravitacija_na_pocetku", "1");
    	cvar_hp_ubistvo = register_cvar("hp_za_kill", "1");
    	cvar_pare_ubistvo = register_cvar("pare_za_kill", "1");
    	ako_je_vip = register_cvar("vip_u_scoreboard", "1");
    	
    	register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
    	register_cvar("amx_maxjumps","1")
    	register_cvar("amx_mjadminonly","0")
    	
    	RegisterHam(Ham_Spawn, "player", "IgracSpawnovan", 1);
    	
    	register_message(get_user_msgid("SayText"), "Prefix");
    	
    	maxplayers = get_maxplayers();
    	gmsgSayText = get_user_msgid("SayText")
    }
    
    public client_putinserver(id)
    {
    	jumpnum[id] = 0
    	dojump[id] = false
    }
    
    public client_disconnect(id)
    {
    	jumpnum[id] = 0
    	dojump[id] = false
    }
    
    public client_PreThink(id)
    {
    	if(!is_user_alive(id)) return PLUGIN_CONTINUE
    	if(get_cvar_num("amx_mjadminonly") && (!access(id,IMA_VIP_FLAG))) return PLUGIN_CONTINUE
    	new nbut = get_user_button(id)
    	new obut = get_user_oldbutton(id)
    	if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
    	{
    		if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
    		{
    			dojump[id] = true
    			jumpnum[id]++
    			return PLUGIN_CONTINUE
    		}
    	}
    	if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    	{
    		jumpnum[id] = 0
    		return PLUGIN_CONTINUE
    	}
    	return PLUGIN_CONTINUE
    }
    
    public client_PostThink(id)
    {
    	if(!is_user_alive(id)) return PLUGIN_CONTINUE
    	if(get_cvar_num("amx_mjadminonly") && (!access(id,IMA_VIP_FLAG))) return PLUGIN_CONTINUE
    	if(dojump[id] == true)
    	{
    		new Float:velocity[3]	
    		entity_get_vector(id,EV_VEC_velocity,velocity)
    		velocity[2] = random_float(265.0,285.0)
    		entity_set_vector(id,EV_VEC_velocity,velocity)
    		dojump[id] = false
    		return PLUGIN_CONTINUE
    	}
    	return PLUGIN_CONTINUE
    }	
    
    public IgracSpawnovan(id)
    {
    	if(get_user_flags(id) & ADMIN_LEVEL_H)
    	{
    		if(get_pcvar_num(cvar_armor))
    			set_user_armor(id, get_user_armor(id) + 100);
    		
    		if(get_pcvar_num(cvar_gravitacija))
    			set_user_gravity(id, 0.6);
    	}
    }
    
    public Mrtav()
    {
    	new napadac = read_data(1);
    	//new id = read_data(2);
    		
    	if(get_user_flags(napadac) & ADMIN_LEVEL_H)
    	{
    		if(get_pcvar_num(cvar_hp_ubistvo))
    			set_user_health(napadac, get_user_health(napadac) + 5);
    			
    		if(get_pcvar_num(cvar_pare_ubistvo))
    			cs_set_user_money(napadac, cs_get_user_money(napadac) + 500);
    	}
    }
    			
    
    public Prefix(msgId,msgDest,msgEnt)
    {
    	new id = get_msg_arg_int(1);
    	
    	if(!is_user_connected(id))        
    		return PLUGIN_CONTINUE;
    	
    	new szTmp[256],szTmp2[256]
    	get_msg_arg_string(2,szTmp, charsmax( szTmp ) )
    	
    	new szPrefix[64]
    	if(get_user_flags(id) & ADMIN_LEVEL_H)
    	{
    		formatex(szPrefix,charsmax( szPrefix ),"^4[VIP]");
    	}
    	
    	if(!equal(szTmp,"#Cstrike_Chat_All")){
    		add(szTmp2,charsmax(szTmp2),szPrefix);
    		add(szTmp2,charsmax(szTmp2)," ");
    		add(szTmp2,charsmax(szTmp2),szTmp);
    	}
    	else{
    		add(szTmp2,charsmax(szTmp2),szPrefix);
    		add(szTmp2,charsmax(szTmp2),"^3 %s1^1 : %s2");
    	}
    	set_msg_arg_string(2,szTmp2);
    	return PLUGIN_CONTINUE;
    }
    
    public MessageScoreAttrib(iMsgId, iDest, iReceiver) 
    {	
    	if(get_pcvar_num(ako_je_vip)) 
    	{
    		new iPlayer = get_msg_arg_int(SCOREATTRIB_ARG_PLAYERID);
            
    		if(access(iPlayer, IMA_VIP_FLAG)) 
    		{
    			set_msg_arg_int(SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP);
    		}
    	}
    }
    
    public handle_say(id) 
    {
    	new said[192]
    	
    	read_args(said, 192)
    
    	if((containi(said, "who") != -1 && containi(said, "vip") != -1) || contain(said, "/vips") != -1)
    		set_task(0.1, "pokazi_vipove", id)
    
    	return PLUGIN_CONTINUE;
    }
    
    public pokazi_vipove(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) & IMA_VIP_FLAG)
    				get_user_name(id, adminnames[count++], 31)
    		
    	len = format(message, 255, "%s ONLINE VIP-ovi su: ", 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, "Nema online VIP-ova")
    		print_message(user, message)
    	}
    	
    	get_cvar_string("amx_contactinfo", contact, 63)
    	if(contact[0])
    	{
    		format(contactinfo, 111, "%s KONTAKTIRAJ VLASNIKA SERVERA -- %s", COLOR, contact)
    		print_message(user, message)
    	}
    }
    
    print_message(id, msg[]) 
    {
    	message_begin(MSG_ONE, gmsgSayText, {0, 0, 0}, id)
    	write_byte(id);
    	write_string(msg);
    	message_end();
    }
    Nista tesko da ubacis sa neta multijump, /vips ...

    Inc ako se bas ne razumes , dodao sam ti cvarove koje pises u amxx.cfg znc 0 je da disable a 1 da enable nesto iz koda, trebao bi da shvatis
    BaseBuilder Mod + VIP System + New BonusBox System - [ |||||||||| - 100% ] - Zavrseno

    Javite mi se na PM za test IP

  3. #3
    Junior Member Array
    Join Date
    Nov 2017
    Karma
    0

    Default

    Hvala ti
    Moze da doda neko i bhop i da se sve dodaje na flag T? i da mi napisete kako ce se davati vip ili ti komanda za davanje vipa

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •