Raised This Month: $ Target: $400
 0% 

[Help] Jailbreak mode editing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Punisher14
New Member
Join Date: Dec 2013
Old 12-07-2013 , 18:16  
Reply With Quote #1

I used this JailBreak .sma file as a base https://forums.alliedmods.net/showthread.php?t=150775 .

I would like to add a "Snow Day" where CT's and Prisoners get snowballs. I know i should add model at the precache of the plugin, but it seems hard to me to script this snowballs(throwing them etc.. ). If anyone could help me, that would be totally amazing. Thanks

#bump, got myself litle into the code, found where should i add the code, i just cant make the snowballs go like they are snowballs, not like HE.


Code:
public cmd_snowday(id)
{
	if (g_Simon == 0 || !is_user_admin(id)) return PLUGIN_HANDLED
	
	g_BoxStarted = 0
	g_nogamerounds = 0
	g_GameMode = 8
	g_Simon == 0
	server_cmd("jb_block_weapons")
	new Players[32] 
	new playerCount, i 
	get_players(Players, playerCount, "ac")
	if (g_GameMode == 8)
	{
		for (i=0; i<playerCount; i++) 
			
		{
			give_item(id, "CSW_HEGRENADE")
			cs_set_user_bpammo(id, CSW_HEGRENADE, 99);
			new weapid = get_user_weapon(id)
			switch(weapid)	
		{
				case CSW_HEGRENADE:
				{
					//Set view model and player model
					entity_set_string(id , EV_SZ_viewmodel , "models/v_snow.mdl"); // set the view model 
					entity_set_string(id , EV_SZ_weaponmodel , "models/p_snow.mdl"); // set the player (view) model 
			
				}
				case CSW_KNIFE:
				{
					entity_set_string(id , EV_SZ_viewmodel , "models/v_knife.mdl"); // set the view model 
					entity_set_string(id , EV_SZ_weaponmodel , "models/p_knife.mdl"); // set the player (view) model ;
				}

			}
		}
	}
}


and then into cmd_simongamesmenu i put this

Code:
	if (containi(allowed,"h") >= 0)
	{
		formatex(option, charsmax(option), "%L", LANG_SERVER, "UJBM_MENU_SIMONMENU_SNOWDAY")
		menu_additem(menu, option, "8", 0)
	}
also added the UJBM_MENU_SIMONMENU_SNOWDAY into the lang file

and then i added the models for precache. The only thing i need to do is code the throwing snowballs and their DMG.

Last edited by ConnorMcLeod; 12-08-2013 at 09:12. Reason: double posting is not allowed
Punisher14 is offline
Punisher14
New Member
Join Date: Dec 2013
Old 12-09-2013 , 14:35   Re: [Help] Jailbreak mode editing
Reply With Quote #2

#Request LOCK, I added it by myself.
Punisher14 is offline
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 10:44.


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