 |
|
Senior Member
Join Date: Feb 2019
Location: Hungary
|

09-05-2020
, 11:09
Re: [BIO] Respawn plugin crashes server
|
#5
|
Quote:
Originally Posted by Supremache
There's somethings wrong in this plugin like:
1. in this faction
PHP Code:
public enfeksiyon_tipi(id)
{
if(is_user_connected(id))
{
switch(get_pcvar_num(cvar_enf_sec))
{
case 1: insan(id)
case 2: zombie(id)
case 3:
{
switch(random_num(1,2))
{
case 1: insan(id)
case 2: zombie(id)
}
}
}
if(get_pcvar_num(cvar_godmode))
{
fm_set_user_godmode(id, 1)
set_task(get_pcvar_float(cvar_godmode_timer), "stop_god", id)
}
}
}
This mod have zombie and human system so the problem in this plugin
PHP Code:
case 1: insan(id)
case 2: zombie(id)
The errors in those factions
Change those codes from:
PHP Code:
public zombie(id)
{
if(!is_user_zombie(id))
{
infect_user(id, 0)
cs_set_user_team(id, CS_TEAM_T)
}
}
public insan(id)
{
if(is_user_zombie(id))
{
cure_user(id)
cs_set_user_team(id, CS_TEAM_CT)
}
fm_give_item(id, "weapon_m4a1")
fm_give_item(id, "weapon_deagle")
fm_give_item(id, "weapon_hegrenade")
fm_give_item(id, "weapon_smokegrenade")
fm_give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_M4A1, 200)
cs_set_user_bpammo(id, CSW_DEAGLE, 200)
cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1)
cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
}
To:
PHP Code:
public zombie(id)
{
if(is_user_zombie(id))
{
infect_user(id, 0)
cs_set_user_team(id, CS_TEAM_T)
}
}
public insan(id)
{
if(!is_user_zombie(id))
{
cure_user(id)
cs_set_user_team(id, CS_TEAM_CT)
}
fm_give_item(id, "weapon_m4a1")
fm_give_item(id, "weapon_deagle")
fm_give_item(id, "weapon_hegrenade")
fm_give_item(id, "weapon_smokegrenade")
fm_give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_M4A1, 200)
cs_set_user_bpammo(id, CSW_DEAGLE, 200)
cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1)
cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
}
|
Well thanks for the help but looks like it didnt help me, still crashing :/
|
|
|
|