[Pomoc] Duel ujbm
Results 1 to 5 of 5

Thread: Duel ujbm

  1. #1
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Jagodina
    Karma
    3

    Default Duel ujbm

    pozz, imam problem kad se starta duel boxa ja sam stavio da se dobiju rukavice za box da bude realnije, i oni dobiju rukavice ono sve full ali fora je u tome ima bug koji npr kad ct pobedi terora teroru ostanu rukavice a ctu se obrisu i obrnuto zavisno ko pobedi. ali na igri knifea radi full. evo sma knife daya i evo sma tog duela i roundend sma kako sam upisao pa ko moze i zna nek pogleda znacilo bi mi pozz ako treba jos nesto sem toga postavicu
    Code:
    public duel_knives(id, menu, item)
    {
    	if(item == MENU_EXIT)
    	{
    		menu_destroy(menu)
    		g_LastDenied = 0
    		return PLUGIN_HANDLED
    	}
    	
    	
    	static dst[32], data[5], access, callback, option[128], player, src[32]
    	
    	menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
    	client_cmd(0, "mp3 stop");
    	client_cmd(0, "mp3 play sound/alfa_box.mp3");
    	get_user_name(id, src, charsmax(src))
    	player = str_to_num(data)
    	server_cmd("jb_block_weapons")
    	formatex(option, charsmax(option), "%L^n%L", LANG_SERVER, "JBEF_MENU_LASTREQ_SEL3", src, LANG_SERVER, "JBEF_MENU_DUEL_SEL", src, dst)
    	player_hudmessage(0, 6, 3.0, {158, 5, 250}, option)
    	
    	
    	g_DuelA = id
    	if(is_user_alive(id) || is_user_connected(id))
    	player_strip_weapons(id)
    	player_glow(id, g_Colors[3])
    	InDuel[id] = true
    	beacon(id)
    	set_user_health(id, 150)
    	set_bit(g_BoxRuke1, id)
    	set_user_armor(id, 0)
    	
    	
    	g_DuelB = player
    	if(is_user_alive(player) || is_user_connected(player))
    	player_strip_weapons(player)
    	player_glow(player, g_Colors[2])
    	set_user_health(player, 150)
    	set_user_armor(id, 0)
    	server_cmd("jb_unblock_teams")
    	InDuel[player] = true
    	beacon(player)
    	set_bit(g_BoxRuke1, player)
    	return PLUGIN_HANDLED
    }
    Round End kod:
    Code:
    public round_end()
    {
    	server_cmd("jb_unblock_weapons")
    	set_cvar_num("mp_friendlyfire", 0)
    	g_PlayerRevolt = 0
    	g_PlayerFreeday = 0
    	g_PlayerLast = 0
    	g_BoxStarted = 0
    	g_Simon = 0
    	g_SimonAllowed = 0
    	g_RoundStarted = 0
    	g_LastDenied = 0
    	g_Freeday = 0
    	g_RoundEnd = 1
    	g_Duel = 0
    
    	remove_task(TASK_STATUS)
    	remove_task(TASK_FREEDAY)
    	remove_task(TASK_FREEEND)
    	remove_task(TASK_ROUND)
    	
    
    	remove_task(800)
    	remove_task(801)
    	remove_task(999)
    	remove_task(900)
    	remove_task(901)
    	remove_task(700)
    	
    	g_spiderman = false
    	LoopResetDuel()
    	
    	new Players[32] 	
    		
    	new playerCount, i 
    	get_players(Players, playerCount, "c") 
    	for (i=0; i<playerCount; i++) 
    	
    	if(is_user_alive(Players[i])) {
    			set_pev(Players[i], pev_viewmodel2, "models/v_round_sound.mdl");
    			UTIL_WeaponAnimation(Players[i], 0);
    			set_pev(Players[i], pev_takedamage, DAMAGE_NO);
    			clear_bit(g_BoxRuke1, Players[i])
    			clear_bit(g_BoxRuke2, Players[i])
    		}
    	
    	
    	
    
    	for(new i = 0; i < sizeof(g_HudSync); i++)
    	ClearSyncHud(0, g_HudSync[i][_hudsync])
    	
    	
    	
    	
    	
    	if (g_GameMode > 1) 
    	{
    		
    		new Players[32] 	
    		
    		new playerCount, i 
    		get_players(Players, playerCount, "c") 
    		for (i=0; i<playerCount; i++) 	
    		{
    			if (is_user_connected(Players[i]) || !is_user_alive(Players[i]))
    			{
    				if (get_bit(g_BackToCT, Players[i])) cs_set_user_team2(Players[i], CS_TEAM_CT)	
    				client_infochanged(Players[i])
    				set_user_maxspeed(Players[i], 250.0)
    				menu_cancel(Players[i])
    				player_strip_weapons(Players[i])
    				fog(false, 0, 0, 0)
    				clear_bit(g_BoxRuke1, Players[i])
    				clear_bit(g_BoxRuke2, Players[i])
    				clear_bit(g_ZombiRuke, Players[i])
    				clear_bit(g_GhostRuke, Players[i])
    				clear_bit(g_SpartaRuke1, Players[i])
    				clear_bit(g_AlienPajser, Players[i])
    				set_pev(Players[i], pev_viewmodel2, "models/v_round_sound.mdl");
    				UTIL_WeaponAnimation(Players[i], 0);
    				set_lights("#OFF");
    				set_user_godmode(Players[i], 0)
    				
    			}
    			
    		}
    		remove_task(7447)
    		remove_task(666)
    		g_BackToCT = 0
    	}
    	g_GameMode = 1
    	
    }
    Knife day:
    Code:
    public cmd_knifeday(id) {
    	if (g_Simon == 0) return PLUGIN_HANDLED
    	if (g_used == 0) {
    		jail_open()
    		set_task( 1.0, "_t_Countdown", 999, _, _, "a", 180 )
    		g_used = 0
    		g_nogamerounds = 0
    		g_GameMode = 8
    		g_BoxStarted = 0
    		set_cvar_num("mp_friendlyfire", 0)
    		entity_set_int(g_Simon, EV_INT_body, 3)
    		g_Simon = 0
    		new i
    		server_cmd("jb_block_weapons")
    		server_cmd("sv_voiceenable 0")
    		get_user_name(id, nick, 63)
    		set_dhudmessage(241, 248, 7, 0.03, 0.55, 0, 1.0, 3.0, 0.2, 0.2, false)
    		show_dhudmessage(0, "%s %L", nick, LANG_SERVER, "JBEF_DAOKNIFE")
    		Color_Print(0, "!g[Silver JB] !team%s !yje startovao Knife Day. Uzivajte u igri.", nick)
    		for(i = 1; i <= g_MaxClients; i++) 
    		{
    			client_cmd(0, "mp3 stop");
    			client_cmd(0, "mp3 play sound/alfa_box.mp3");
    			if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT))
    			{
    				strip_user_weapons(i)
    				give_item(i, "weapon_knife")
    				set_user_health(i, 85)
    				set_user_maxspeed(i, 300.0)
    				set_user_footsteps(i, 1)
    				set_bit(g_BoxRuke2, i)
    			}
    			else if(is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
    			{
    				strip_user_weapons(i)
    				give_item(i, "weapon_knife")
    				set_user_health(i, 50)
    				set_user_maxspeed(i, 300.0)
    				set_user_footsteps(i, 1)
    				set_bit(g_BoxRuke1, i)
    			}
    		}
    	}
    	return PLUGIN_HANDLED
    }

  2. #2
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Belgrade
    Karma
    6

    Default

    Quote Originally Posted by Candy00 View Post
    kad ct pobedi terora teroru ostanu rukavice a ctu se obrisu i obrnuto zavisno ko pobedi
    Cek znaci kad ct pobedi obrisu mu se rukavice a teroru ostanu?
    Kako teroru ostanu kad je on umro? Mislis u sledecoj rundi ili ?

  3. #3
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Jagodina
    Karma
    3

    Default

    Quote Originally Posted by luka317 View Post
    Cek znaci kad ct pobedi obrisu mu se rukavice a teroru ostanu?
    Kako teroru ostanu kad je on umro? Mislis u sledecoj rundi ili ?
    Kada CT pobedi terora ili obrnuto,pobedniku se brisu rukavice a gubitniku bukvalno ostanu.
    Da u sledecoj rundi tako bude.
    Last edited by Candy00; 29-12-2017 at 00:58.

  4. #4
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    10

    Default

    ako na pocetku runde dobija igrac koji se tad rodio, na pocetku, onda je to RoundStart deo plagina, valjda

  5. #5
    Junior Member Array
    Join Date
    Dec 2017
    Karma
    0

    Default

    Quote Originally Posted by Candy00 View Post
    pozz, imam problem kad se starta duel boxa ja sam stavio da se dobiju rukavice za box da bude realnije, i oni dobiju rukavice ono sve full ali fora je u tome ima bug koji npr kad ct pobedi terora teroru ostanu rukavice a ctu se obrisu i obrnuto zavisno ko pobedi. ali na igri knifea radi full. evo sma knife daya i evo sma tog duela i roundend sma kako sam upisao pa ko moze i zna nek pogleda znacilo bi mi pozz ako treba jos nesto sem toga postavicu
    Code:
    public duel_knives(id, menu, item)
    {
    	if(item == MENU_EXIT)
    	{
    		menu_destroy(menu)
    		g_LastDenied = 0
    		return PLUGIN_HANDLED
    	}
    	
    	
    	static dst[32], data[5], access, callback, option[128], player, src[32]
    	
    	menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
    	client_cmd(0, "mp3 stop");
    	client_cmd(0, "mp3 play sound/alfa_box.mp3");
    	get_user_name(id, src, charsmax(src))
    	player = str_to_num(data)
    	server_cmd("jb_block_weapons")
    	formatex(option, charsmax(option), "%L^n%L", LANG_SERVER, "JBEF_MENU_LASTREQ_SEL3", src, LANG_SERVER, "JBEF_MENU_DUEL_SEL", src, dst)
    	player_hudmessage(0, 6, 3.0, {158, 5, 250}, option)
    	
    	
    	g_DuelA = id
    	if(is_user_alive(id) || is_user_connected(id))
    	player_strip_weapons(id)
    	player_glow(id, g_Colors[3])
    	InDuel[id] = true
    	beacon(id)
    	set_user_health(id, 150)
    	set_bit(g_BoxRuke1, id)
    	set_user_armor(id, 0)
    	
    	
    	g_DuelB = player
    	if(is_user_alive(player) || is_user_connected(player))
    	player_strip_weapons(player)
    	player_glow(player, g_Colors[2])
    	set_user_health(player, 150)
    	set_user_armor(id, 0)
    	server_cmd("jb_unblock_teams")
    	InDuel[player] = true
    	beacon(player)
    	set_bit(g_BoxRuke1, player)
    	return PLUGIN_HANDLED
    }
    Round End kod:
    Code:
    public round_end()
    {
    	server_cmd("jb_unblock_weapons")
    	set_cvar_num("mp_friendlyfire", 0)
    	g_PlayerRevolt = 0
    	g_PlayerFreeday = 0
    	g_PlayerLast = 0
    	g_BoxStarted = 0
    	g_Simon = 0
    	g_SimonAllowed = 0
    	g_RoundStarted = 0
    	g_LastDenied = 0
    	g_Freeday = 0
    	g_RoundEnd = 1
    	g_Duel = 0
    
    	remove_task(TASK_STATUS)
    	remove_task(TASK_FREEDAY)
    	remove_task(TASK_FREEEND)
    	remove_task(TASK_ROUND)
    	
    
    	remove_task(800)
    	remove_task(801)
    	remove_task(999)
    	remove_task(900)
    	remove_task(901)
    	remove_task(700)
    	
    	g_spiderman = false
    	LoopResetDuel()
    	
    	new Players[32] 	
    		
    	new playerCount, i 
    	get_players(Players, playerCount, "c") 
    	for (i=0; i<playerCount; i++) 
    	
    	if(is_user_alive(Players[i])) {
    			set_pev(Players[i], pev_viewmodel2, "models/v_round_sound.mdl");
    			UTIL_WeaponAnimation(Players[i], 0);
    			set_pev(Players[i], pev_takedamage, DAMAGE_NO);
    			clear_bit(g_BoxRuke1, Players[i])
    			clear_bit(g_BoxRuke2, Players[i])
    		}
    	
    	
    	
    
    	for(new i = 0; i < sizeof(g_HudSync); i++)
    	ClearSyncHud(0, g_HudSync[i][_hudsync])
    	
    	
    	
    	
    	
    	if (g_GameMode > 1) 
    	{
    		
    		new Players[32] 	
    		
    		new playerCount, i 
    		get_players(Players, playerCount, "c") 
    		for (i=0; i<playerCount; i++) 	
    		{
    			if (is_user_connected(Players[i]) || !is_user_alive(Players[i]))
    			{
    				if (get_bit(g_BackToCT, Players[i])) cs_set_user_team2(Players[i], CS_TEAM_CT)	
    				client_infochanged(Players[i])
    				set_user_maxspeed(Players[i], 250.0)
    				menu_cancel(Players[i])
    				player_strip_weapons(Players[i])
    				fog(false, 0, 0, 0)
    				clear_bit(g_BoxRuke1, Players[i])
    				clear_bit(g_BoxRuke2, Players[i])
    				clear_bit(g_ZombiRuke, Players[i])
    				clear_bit(g_GhostRuke, Players[i])
    				clear_bit(g_SpartaRuke1, Players[i])
    				clear_bit(g_AlienPajser, Players[i])
    				set_pev(Players[i], pev_viewmodel2, "models/v_round_sound.mdl");
    				UTIL_WeaponAnimation(Players[i], 0);
    				set_lights("#OFF");
    				set_user_godmode(Players[i], 0)
    				
    			}
    			
    		}
    		remove_task(7447)
    		remove_task(666)
    		g_BackToCT = 0
    	}
    	g_GameMode = 1
    	
    }
    Knife day:
    Code:
    public cmd_knifeday(id) {
    	if (g_Simon == 0) return PLUGIN_HANDLED
    	if (g_used == 0) {
    		jail_open()
    		set_task( 1.0, "_t_Countdown", 999, _, _, "a", 180 )
    		g_used = 0
    		g_nogamerounds = 0
    		g_GameMode = 8
    		g_BoxStarted = 0
    		set_cvar_num("mp_friendlyfire", 0)
    		entity_set_int(g_Simon, EV_INT_body, 3)
    		g_Simon = 0
    		new i
    		server_cmd("jb_block_weapons")
    		server_cmd("sv_voiceenable 0")
    		get_user_name(id, nick, 63)
    		set_dhudmessage(241, 248, 7, 0.03, 0.55, 0, 1.0, 3.0, 0.2, 0.2, false)
    		show_dhudmessage(0, "%s %L", nick, LANG_SERVER, "JBEF_DAOKNIFE")
    		Color_Print(0, "!g[Silver JB] !team%s !yje startovao Knife Day. Uzivajte u igri.", nick)
    		for(i = 1; i <= g_MaxClients; i++) 
    		{
    			client_cmd(0, "mp3 stop");
    			client_cmd(0, "mp3 play sound/alfa_box.mp3");
    			if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT))
    			{
    				strip_user_weapons(i)
    				give_item(i, "weapon_knife")
    				set_user_health(i, 85)
    				set_user_maxspeed(i, 300.0)
    				set_user_footsteps(i, 1)
    				set_bit(g_BoxRuke2, i)
    			}
    			else if(is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
    			{
    				strip_user_weapons(i)
    				give_item(i, "weapon_knife")
    				set_user_health(i, 50)
    				set_user_maxspeed(i, 300.0)
    				set_user_footsteps(i, 1)
    				set_bit(g_BoxRuke1, i)
    			}
    		}
    	}
    	return PLUGIN_HANDLED
    }
    U player_spawn stavi
    clear_bit(, id) za sve modele koje ti se nalazi u current_weapon(id)
    Last edited by Big ShaQ; 31-12-2017 at 17:42.

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
  •