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.