Raised This Month: $ Target: $400
 0% 

Fixes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cTn
Senior Member
Join Date: Oct 2005
Old 11-01-2005 , 14:38   Fixes
Reply With Quote #1

m unfinished plugin

Code:
#include <amxmod>
#include <amxmisc>
#include <fun>  



public plugin_init() { 
	register_plugin("cTn stuff","1.0","cTn")
	register_concmd("say /ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")
	register_concmd("amx_ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")
	register_concmd("amx_ctnstuff2","ShowMenu2",ADMIN_LEVEL_A,"show cTn stuff menu")
	register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" ) 
	register_menucmd(register_menuid("\ySecond Menu:"), 1023, "MenuCommand2" ) 
	
	return PLUGIN_CONTINUE 
} 

public ShowMenu( id ) { 
	if (!(get_user_flags(id)&ADMIN_LEVEL_A)) { 
		
		return PLUGIN_HANDLED 
	} 
	new szMenuBody[256] 
	new keys 
	
	new nLen = format( szMenuBody, 255, "\yFirst Menu:^n" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Give m4a1" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Give ak47" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Give awp" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Health 250" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Armor 250" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alpha render 50%" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Glow ORANGE" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Glow RED" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Next" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" ) 
	
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9) 
	
	show_menu( id, keys, szMenuBody, -1 ) 
	
	return PLUGIN_CONTINUE 
} 

public MenuCommand( id, key ) { 
	
	switch( key ) { 
		
		case 0: {
			give_item( id, "weapon_m4a1" )
			give_item( id, "weapon_m4a1" ) 
			give_item( id, "weapon_m4a1" ) 
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Gived M4A1") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 1: {
			give_item( id, "weapon_ak47" )
			give_item( id, "weapon_ak47" ) 
			give_item( id, "weapon_ak47" ) 
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Gived AK47") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 2: {
			give_item( id, "weapon_awp" )
			give_item( id, "weapon_awp" )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Gived AWM") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 3: {
			set_user_health( id, 250 )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: HEALTH 250") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 4: {
			set_user_armor( id, 250 )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: ARMOR 250") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 5: {
			set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,50)
			set_hudmessage(255, 255, 255, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: 50% Invisible") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 6: {
			set_user_rendering(id,kRenderFxGlowShell,255,198,0,kRenderNormal,25)
			set_hudmessage(255, 198, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Glow ORANGE") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}
		case 7: {
			set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
			set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Glow RED") 
			console_cmd( id, "amx_ctnstuff" )
			return PLUGIN_HANDLED 
		}	 
		case 8: ShowMenu2(id)
		
		//case 9: client_print( id, print_chat, "Menu Option EXIT" ) 
	} 
	
	return PLUGIN_HANDLED 
}

// Menu 2

public ShowMenu2( id ) { 
	if (!(get_user_flags(id)&ADMIN_LEVEL_A)) { 
		
		return PLUGIN_HANDLED 
	} 
	new szMenuBody[256] 
	new keys 
	
	new nLen = format( szMenuBody, 255, "\ySecond Menu:^n" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Killing mix 1" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Killing mix 2" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Gravity 50%" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Money 16000" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. GLOW OFF" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alien mode" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Alpha render 5%" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Alpha render 0" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Back" ) 
	nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" ) 
	
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9) 
	
	show_menu( id, keys, szMenuBody, -1 ) 
	
	return PLUGIN_CONTINUE 
} 

public MenuCommand2( id, key ) { 
	
	switch( key ) { 
		
		case 0: {
			strip_user_weapons( id )
			give_item( id, "weapon_m4a1" )
			give_item( id, "weapon_m4a1" ) 
			give_item( id, "weapon_m4a1" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_knife" )
			set_user_armor( id, 100 )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Killing mix1" )
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 1: {
			strip_user_weapons( id )
			give_item( id, "weapon_ak47" )
			give_item( id, "weapon_ak47" ) 
			give_item( id, "weapon_ak47" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_deagle" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_knife" )
			set_user_armor( id, 100 )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Killing mix2" )
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 2: {
			set_user_gravity( id, 0.5) 
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Gravity 50%" )
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 3: {
			cs_set_user_money( id, 16000, 1 )
			set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Money 16000" )
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 4: {
			set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
			set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Glow OFF") 
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 5: {
			set_user_rendering(id,kRenderFxGlowShell,0,255,0, kRenderTransAlpha,25)
			set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: Alien mode") 
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 6: {
			set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,5)
			set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: 95% invisible") 
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 7: {
			set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,0)
			set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)
			show_hudmessage(id,"cTn stuff: 100% invisible") 
			console_cmd( id, "amx_ctnstuff2" )
			return PLUGIN_HANDLED 
		}
		case 8: ShowMenu(id)
		
		//case 9: client_print( id, print_chat, "Menu Option EXIT" ) 
	} 
	
	return PLUGIN_HANDLED 
}
so there is much problems

1st can be menu without "console_cmd( id, "amx_ctnstuff2" )" in every button ? i need to set menu open .. but just more simply .. command

2 give_item( id, "weapon_ak47" ) how to add ammo to guns without spamming

like
give_item( id, "weapon_ak47" )
give_item( id, "weapon_ak47" )
give_item( id, "weapon_ak47" )

3 gravity one of m sucky bugs i need to set gravity permanently for user ( permanently-for one map as example or just for time when admin disable it (for now no button to doo this because gravity work bad... )
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
cTn
Senior Member
Join Date: Oct 2005
Old 11-01-2005 , 16:40  
Reply With Quote #2

i still waiting
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 11:43  
Reply With Quote #3

cs_set_user_bpammo is what you want for weapon ammo. Try this, any questions, just ask
Code:
#include <amxmod> #include <amxmisc> #include <fun> public plugin_init() {    register_plugin("cTn stuff","1.0","cTn")    register_concmd("say /ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")    register_concmd("amx_ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")    register_concmd("amx_ctnstuff2","ShowMenu2",ADMIN_LEVEL_A,"show cTn stuff menu")    register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" )    register_menucmd(register_menuid("\ySecond Menu:"), 1023, "MenuCommand2" )    register_event("ResetHUD","SetGravity","b")        return PLUGIN_CONTINUE } new bool:g_bGravity[33] public client_connect( id ) {    g_bGravity[id] = false } public client_disconnect( id ) {    g_bGravity[id] = false } public SetGravity( id ) {    if(g_bGravity[id] == true) {       set_user_gravity(id, 0.5)    } } public ShowMenu( id ) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {             return PLUGIN_HANDLED    }    new szMenuBody[256]    new keys        new nLen = format( szMenuBody, 255, "\yFirst Menu:^n" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Give m4a1" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Give ak47" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Give awp" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Health 250" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Armor 250" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alpha render 50%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Glow ORANGE" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Glow RED" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Next" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )        keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)        show_menu( id, keys, szMenuBody, -1 )        return PLUGIN_HANDLED } public MenuCommand( id, key ) {        switch( key ) {             case 0: {          give_item( id, "weapon_m4a1" )          cs_set_user_bpammo(id, CSW_M4A1, 90)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived M4A1")          console_cmd( id, "amx_ctnstuff" )       }       case 1: {          give_item( id, "weapon_ak47" )          cs_set_user_bpammo(id, CSW_AK47, 90)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived AK47")          console_cmd( id, "amx_ctnstuff" )       }       case 2: {          give_item( id, "weapon_awp" )          cs_set_user_bpammo(id, CSW_AWP, 30)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived AWM")          console_cmd( id, "amx_ctnstuff" )       }       case 3: {          set_user_health( id, 250 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: HEALTH 250")          console_cmd( id, "amx_ctnstuff" )       }       case 4: {          set_user_armor( id, 250 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: ARMOR 250")          console_cmd( id, "amx_ctnstuff" )       }       case 5: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,50)          set_hudmessage(255, 255, 255, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 50% Invisible")          console_cmd( id, "amx_ctnstuff" )       }       case 6: {          set_user_rendering(id,kRenderFxGlowShell,255,198,0,kRenderNormal,25)          set_hudmessage(255, 198, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow ORANGE")          console_cmd( id, "amx_ctnstuff" )       }       case 7: {          set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)          set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow RED")          console_cmd( id, "amx_ctnstuff" )       }         case 8: ShowMenu2(id)             //case 9: client_print( id, print_chat, "Menu Option EXIT" )    }    if(key != 9) {       ShowMenu2(id)    }        return PLUGIN_HANDLED } // Menu 2 public ShowMenu2( id ) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {             return PLUGIN_HANDLED    }    new szMenuBody[256]    new keys        new nLen = format( szMenuBody, 255, "\ySecond Menu:^n" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Killing mix 1" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Killing mix 2" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Gravity 50%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Money 16000" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. GLOW OFF" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alien mode" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Alpha render 5%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Alpha render 0" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Back" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )        keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)        show_menu( id, keys, szMenuBody, -1 )        return PLUGIN_HANDLED } public MenuCommand2( id, key ) {        switch( key ) {             case 0: {          strip_user_weapons( id )          give_item( id, "weapon_m4a1" )          cs_set_user_bpammo(id, CSW_M4A1, 90)          give_item( id, "weapon_deagle" )          cs_set_user_bpammo(id, CSW_DEAGLE, 35)          give_item( id, "weapon_hegrenade" )          give_item( id, "weapon_smokegrenade" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_knife" )          set_user_armor( id, 100 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Killing mix1" )          console_cmd( id, "amx_ctnstuff2" )       }       case 1: {          strip_user_weapons( id )          give_item( id, "weapon_ak47" )          cs_set_user_bpammo(id, CSW_AK47, 90)          give_item( id, "weapon_deagle" )          cs_set_user_bpammo(id, CSW_DEAGLE, 35)          give_item( id, "weapon_hegrenade" )          give_item( id, "weapon_smokegrenade" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_knife" )          set_user_armor( id, 100 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Killing mix2" )          console_cmd( id, "amx_ctnstuff2" )       }       case 2: {          g_bGravity[id] = true          set_user_gravity( id, 0.5)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gravity 50%" )          console_cmd( id, "amx_ctnstuff2" )       }       case 3: {          cs_set_user_money( id, 16000, 1 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Money 16000" )          console_cmd( id, "amx_ctnstuff2" )       }       case 4: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)          set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow OFF")          console_cmd( id, "amx_ctnstuff2" )       }       case 5: {          set_user_rendering(id,kRenderFxGlowShell,0,255,0, kRenderTransAlpha,25)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Alien mode")          console_cmd( id, "amx_ctnstuff2" )       }       case 6: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,5)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 95% invisible")          console_cmd( id, "amx_ctnstuff2" )       }       case 7: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,0)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 100% invisible")          console_cmd( id, "amx_ctnstuff2" )       }       case 8: ShowMenu(id)             //case 9: client_print( id, print_chat, "Menu Option EXIT" )    }    // This    if(key != 9) {       ShowMenu2(id)    }        return PLUGIN_HANDLED }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-02-2005 , 11:46  
Reply With Quote #4

v3x u reaaalyy ROOOOOOOOOOOOOOOOOOOXXX thank uuu soo much
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 15:09  
Reply With Quote #5

Okay, try this:
Code:
#include <amxmod> #include <amxmisc> #include <fun> public plugin_init() {    register_plugin("cTn stuff","1.0","cTn")    register_concmd("say /ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")    register_concmd("amx_ctnstuff","ShowMenu",ADMIN_LEVEL_A,"show cTn stuff menu")    register_concmd("amx_ctnstuff2","ShowMenu2",ADMIN_LEVEL_A,"show cTn stuff menu")    register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" )    register_menucmd(register_menuid("\ySecond Menu:"), 1023, "MenuCommand2" )    register_logevent("SetGravity",2,"0=World triggered","1=Round_Start")        return PLUGIN_CONTINUE } new bool:g_bGravity[33] public client_connect( id ) {    g_bGravity[id] = false } public client_disconnect( id ) {    g_bGravity[id] = false } public SetGravity() {    new players[32],num,i    get_players(players,num,"a")    for(i = 0; i <= num; i++)    {       new id = players[i]       if(is_user_connected(id) && g_bGravity[id] == true) {          set_user_gravity(id, 0.5)       }    } } public ShowMenu( id ) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {             return PLUGIN_HANDLED    }    new szMenuBody[256]    new keys        new nLen = format( szMenuBody, 255, "\yFirst Menu:^n" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Give m4a1" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Give ak47" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Give awp" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Health 250" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Armor 250" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alpha render 50%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Glow ORANGE" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Glow RED" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Next" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )        keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)        show_menu( id, keys, szMenuBody, -1 )        return PLUGIN_HANDLED } public MenuCommand( id, key ) {        switch( key ) {             case 0: {          give_item( id, "weapon_m4a1" )          cs_set_user_bpammo(id, CSW_M4A1, 90)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived M4A1")          console_cmd( id, "amx_ctnstuff" )       }       case 1: {          give_item( id, "weapon_ak47" )          cs_set_user_bpammo(id, CSW_AK47, 90)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived AK47")          console_cmd( id, "amx_ctnstuff" )       }       case 2: {          give_item( id, "weapon_awp" )          cs_set_user_bpammo(id, CSW_AWP, 30)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gived AWM")          console_cmd( id, "amx_ctnstuff" )       }       case 3: {          set_user_health( id, 250 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: HEALTH 250")          console_cmd( id, "amx_ctnstuff" )       }       case 4: {          set_user_armor( id, 250 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: ARMOR 250")          console_cmd( id, "amx_ctnstuff" )       }       case 5: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,50)          set_hudmessage(255, 255, 255, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 50% Invisible")          console_cmd( id, "amx_ctnstuff" )       }       case 6: {          set_user_rendering(id,kRenderFxGlowShell,255,198,0,kRenderNormal,25)          set_hudmessage(255, 198, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow ORANGE")          console_cmd( id, "amx_ctnstuff" )       }       case 7: {          set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)          set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow RED")          console_cmd( id, "amx_ctnstuff" )       }         case 8: ShowMenu2(id)             //case 9: client_print( id, print_chat, "Menu Option EXIT" )    }    if(key != 9) {       ShowMenu2(id)    }        return PLUGIN_HANDLED } // Menu 2 public ShowMenu2( id ) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {             return PLUGIN_HANDLED    }    new szMenuBody[256]    new keys        new nLen = format( szMenuBody, 255, "\ySecond Menu:^n" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Killing mix 1" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Killing mix 2" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Gravity 50%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Money 16000" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. GLOW OFF" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Alien mode" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Alpha render 5%" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Alpha render 0" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Back" )    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )        keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)        show_menu( id, keys, szMenuBody, -1 )        return PLUGIN_HANDLED } public MenuCommand2( id, key ) {        switch( key ) {             case 0: {          strip_user_weapons( id )          give_item( id, "weapon_m4a1" )          cs_set_user_bpammo(id, CSW_M4A1, 90)          give_item( id, "weapon_deagle" )          cs_set_user_bpammo(id, CSW_DEAGLE, 35)          give_item( id, "weapon_hegrenade" )          give_item( id, "weapon_smokegrenade" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_knife" )          set_user_armor( id, 100 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Killing mix1" )          console_cmd( id, "amx_ctnstuff2" )       }       case 1: {          strip_user_weapons( id )          give_item( id, "weapon_ak47" )          cs_set_user_bpammo(id, CSW_AK47, 90)          give_item( id, "weapon_deagle" )          cs_set_user_bpammo(id, CSW_DEAGLE, 35)          give_item( id, "weapon_hegrenade" )          give_item( id, "weapon_smokegrenade" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_flashbang" )          give_item( id, "weapon_knife" )          set_user_armor( id, 100 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Killing mix2" )          console_cmd( id, "amx_ctnstuff2" )       }       case 2: {          g_bGravity[id] = true          set_user_gravity( id, 0.5)          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Gravity 50%" )          console_cmd( id, "amx_ctnstuff2" )       }       case 3: {          cs_set_user_money( id, 16000, 1 )          set_hudmessage(100, 200, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Money 16000" )          console_cmd( id, "amx_ctnstuff2" )       }       case 4: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)          set_hudmessage(255, 0, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Glow OFF")          console_cmd( id, "amx_ctnstuff2" )       }       case 5: {          set_user_rendering(id,kRenderFxGlowShell,0,255,0, kRenderTransAlpha,25)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: Alien mode")          console_cmd( id, "amx_ctnstuff2" )       }       case 6: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,5)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 95% invisible")          console_cmd( id, "amx_ctnstuff2" )       }       case 7: {          set_user_rendering(id,kRenderFxGlowShell,0,0,0, kRenderTransAlpha,0)          set_hudmessage(0, 255, 0, 0.03, 0.24, 0, 0.0, 0.0, 4.0, 10.0,1)          show_hudmessage(id,"cTn stuff: 100% invisible")          console_cmd( id, "amx_ctnstuff2" )       }       case 8: ShowMenu(id)             //case 9: client_print( id, print_chat, "Menu Option EXIT" )    }    // This    if(key != 9) {       ShowMenu2(id)    }        return PLUGIN_HANDLED }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-02-2005 , 15:13  
Reply With Quote #6

Code:
public SetGravity()
{
   new players[32],num,i
   get_players(players,num,"a")

   for(i = 0; i <= num; i++)
   {
      new id = players[i]

      if(is_user_connected(id) && g_bGravity[id] == true) {
         set_user_gravity(id, 0.5)
      }
   }
}
can be gravity other? i mean if i try make a fly menu with more gravities?
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 15:21  
Reply With Quote #7

You can always add more to the SetGravity() function.

Code:
public SetGravity() {    new players[32],num,i    get_players(players,num,"a")    for(i = 0; i <= num; i++)    {       new id = players[i]       if(is_user_connected(id) && g_bGravity[id] == true) {          set_user_gravity(id, 0.5)       }       // If you wanted to add something else like noclip, you'd do this:       if(is_user_connected(id) && g_bNoClip[id] == true) {          set_user_noclip(id, 1)       }    } }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-02-2005 , 15:27  
Reply With Quote #8

oo nice question n2 u doo the script for noclip with team ? i think u now about what i am tolking...
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 15:31  
Reply With Quote #9

I'm not quite sure what you're trying to say.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-02-2005 , 15:33  
Reply With Quote #10

i see on one jump server plugin what allows (default enabled) no blocks for players so thei can goo true team players and jump jump and jump with any problems and i need this for admin (me)
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode