Ето го кода:
Код за потвърждение: Избери целия код
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#include <amxmisc>
#include <heroez>
#include <hamsandwich>
#include <Goldanite>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <xs>
/* ToDo List:
* glowa da e po chesto
*
*
*
*
*
*
*
*/
#define PLUGIN "Goldanite"
#define VERSION "3.5"
#define AUTHOR "SmirnoffBG"
#define EXTRA_CVARS 2
#define SPAMA 111
#define SPAMA2 222
#define SPAWNGOLD 333
//#define COLOR
// This native gets the colorfull name form colornames plugin and return its team color
#if defined COLOR
native colornames_name(id, name[191])
#endif
new bool:gHas_Golden[33][33], texta[33][51], user_name[33][50]
new const size2 = sizeof pcvar_name;
new pcvar[sizeof pcvar_name], pcvar_nums[sizeof pcvar_name], Vipa[3]
new flaga, beama, gold_menu, World_Models_On, costa, FreeGold = ADMIN_RCON
new wepid2[33], GoldOnSpawn[33], GoldBackup[33], bool:AllowedWeps[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /goldmenu", "ShowMenu")
register_clcmd("say_team /goldmenu", "ShowMenu")
register_clcmd("say /gold", "ShowMenu")
register_clcmd("say gold", "ShowMenu")
register_clcmd("say goldmenu", "ShowMenu")
register_clcmd("say_team /gold", "ShowMenu")
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
RegisterHam(Ham_Killed, "player", "fw_Killed", 1)
RegisterHam(Ham_Spawn, "player", "fw_Spawned", 1)
//register_forward(FM_SetModel, "fw_SetModel");
//register_event("CurWeapon","checkWeapon","be", "1=1")
RegisterHam(Ham_Item_Deploy, "weapon_p228", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_scout", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_xm1014", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_mac10", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_aug", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_elite", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_fiveseven", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_ump45", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_sg550", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_galil", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_famas", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_usp", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_glock18", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_awp", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_mp5navy", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_m249", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_m3", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_tmp", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_g3sg1", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_deagle", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_sg552", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_ak47", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_knife", "ModelChange", 1)
RegisterHam(Ham_Item_Deploy, "weapon_p90", "ModelChange", 1)
register_forward(FM_TraceLine, "fwTraceLine")
get_cvar_string("hostname",user_name[0], 49)
get_pcvar_string(pcvar[size2-2], Vipa, 2)
if(Vipa[0] == '1')
{
Vipa[0] = 't';
}
flaga = read_flags(Vipa)
get_pcvar_string(pcvar[size2-1], Vipa, 2)
if(Vipa[0] == '1')
{
Vipa[0] = 'l';
}
FreeGold = read_flags(Vipa)
gold_menu = menu_create("\yGold \wMenu^n\yFor \rV\w.\rI\w.\rP\w. there is \r50% OFF!", "GoldMenuto")
register_clcmd("say", "Golden_Handle")
new i, j, ItemName[50];
for(i=0,j=1; j <= size2-(EXTRA_CVARS+1);i+=2,j++)
{
if(pcvar_nums[j] == 1)
{
register_concmd(cmds[i], "Golden_Handle")
//register_clcmd(cmds[i+1], "Golden_Handle")
//strtoupper(cmds[i])
formatex(ItemName, 29, "\yGolden %s \r[%d cost]",cmds[i][10], floatround(costa*PriceBalance[PricesNumFix[j]]))
menu_additem(gold_menu, ItemName, cmds[i])
AllowedWeps[PricesNumFix[j]] = true
}
}
}
public fw_Spawned(id)
{
set_task(3.0, "GiveGoldSpawn", id+SPAWNGOLD)
texta[id] = ""
}
public GiveGoldSpawn(id)
{
id -= SPAWNGOLD
if(!is_user_alive(id)) return
if(GoldOnSpawn[id]>0)
{
give_gold(-2, id, GoldOnSpawn[id])
GoldOnSpawn[id] = 0
}
}
public ModelChange(ent)
{
new id = get_pdata_cbase(ent, 41, 4)
wepid2[id] = ent
if(!is_user_alive(id)) return
new wid = get_pdata_int(ent, 43, 4)
if(gHas_Golden[wid][id]) switch(wid)
{
case CSW_AK47: set_pev( id, pev_viewmodel2, V_AK)
case CSW_AUG: set_pev( id, pev_viewmodel2, V_AUG)
case CSW_AWP: set_pev( id, pev_viewmodel2, V_AWP)
case CSW_DEAGLE: set_pev( id, pev_viewmodel2, V_DEAGLE)
case CSW_ELITE: set_pev( id, pev_viewmodel2, V_ELITE)
case CSW_FAMAS: set_pev( id, pev_viewmodel2, V_FAMAS)
case CSW_FIVESEVEN:set_pev( id, pev_viewmodel2, V_FIVESEVEN)
case CSW_G3SG1: set_pev( id, pev_viewmodel2, V_G3SG1)
case CSW_GALIL: set_pev( id, pev_viewmodel2, V_GALIL)
case CSW_GLOCK18:set_pev( id, pev_viewmodel2, V_GLOCK)
case CSW_KNIFE: set_pev( id, pev_viewmodel2, V_KNIFE)
case CSW_M249: set_pev( id, pev_viewmodel2, V_M249)
case CSW_M3: set_pev( id, pev_viewmodel2, V_M3)
case CSW_M4A1: set_pev( id, pev_viewmodel2, V_M4)
case CSW_MAC10: set_pev( id, pev_viewmodel2, V_MAC10)
case CSW_MP5NAVY:set_pev( id, pev_viewmodel2, V_MP5)
case CSW_P228: set_pev( id, pev_viewmodel2, V_P228)
case CSW_P90: set_pev( id, pev_viewmodel2, V_P90)
case CSW_SCOUT: set_pev( id, pev_viewmodel2, V_SCOUT)
case CSW_SG550: set_pev( id, pev_viewmodel2, V_SG550)
case CSW_SG552: set_pev( id, pev_viewmodel2, V_SG552)
case CSW_TMP: set_pev( id, pev_viewmodel2, V_TMP)
case CSW_UMP45: set_pev( id, pev_viewmodel2, V_UMP45)
case CSW_USP: set_pev( id, pev_viewmodel2, V_USP)
case CSW_XM1014: set_pev( id, pev_viewmodel2, V_XM1014)
}
}
public ShowMenu(id)
{
menu_display(id, gold_menu)
}
public GoldMenuto(id, menu, item)
{
new acc, info[50], call;
menu_item_getinfo(menu, item, acc, info, sizeof info-1, {0}, 0, call)
Golden_Handle(id, info)
}
public Golden_Handle(id, the_cmd[50])
{
new chara, idto[50], tid =-1, bool:is_console
if(!equal(the_cmd, "amx_golden",10))
{
read_argv(0, the_cmd, 49)
remove_quotes(the_cmd)
if(equal(the_cmd, "say"))
{
read_argv(1, the_cmd, 49)
remove_quotes(the_cmd)
strtolower(the_cmd)
if(!equal(the_cmd, "/golden",7))
{
the_cmd = ""
return PLUGIN_CONTINUE
}
strtok(the_cmd, the_cmd, 49, idto, 49, ' ')
chara = 7
if(idto[0] != EOS)
{
new SpaceCheck[50]
copy(SpaceCheck,49,idto)
replace_all(SpaceCheck,49," ","");
if(strlen(SpaceCheck) > 0)
{
new found1 = -1
for(new i=1;i<33;i++)
{
if(!is_user_connected(i)) continue
if(containi(user_name[i], idto) != -1)
{
if(equali(user_name[i], idto))
{
found1 = i
break
} else {
if(found1 == -1)
found1=i
else {
ColorChat(id, RED, "^4[^1Goldens^4] ^3Too many ^4posible names^1! ^3Please ^4type^1 the ^3full name^1.")
the_cmd = ""
return PLUGIN_HANDLED
}
}
}
}
if(found1 == -1)
{
ColorChat(id, RED, "^4[^1Goldens^4] ^3No such ^4player ^1found! ^3Please ^4type^1 the ^3full name^1.")
the_cmd = ""
return PLUGIN_HANDLED
}
tid = found1
}
}
} else if(equal(the_cmd, "amx_golden",10)) {
is_console = true
if(read_argc() == 2)
{
read_argv(1, idto, 49)
new userid = str_to_num(idto[1])
new found1 = -1
for(new i;i<33;i++)
{
if(!is_user_connected(i)) continue
if(idto[0] == '#')
{
if(get_user_userid(i) != userid)
continue
found1 = i
} else if(containi(user_name[i], idto) != -1)
{
if(equali(user_name[i], idto))
{
found1 = i
break
} else {
if(found1 == -1)
found1=i
else {
client_print(id, print_console, "[Goldens] Too many posible names! Please type the full name.")
the_cmd = ""
return PLUGIN_HANDLED
}
}
}
}
if(found1 == -1)
{
client_print(id, print_console, "[Goldens] No such player found! Please type the full name.")
the_cmd = ""
return PLUGIN_HANDLED
}
tid = found1
}
chara = 10
}else
{
the_cmd = ""
return PLUGIN_CONTINUE
}
} else chara = 10
switch(the_cmd[chara])
{
case 'a': switch(the_cmd[chara+1])
{
case 'k':give_gold(id, tid, CSW_AK47)
case 'u':give_gold(id, tid, CSW_AUG)
case 'w':give_gold(id, tid, CSW_AWP)
}
case 'd':give_gold(id, tid, CSW_DEAGLE)
case 'e':give_gold(id, tid, CSW_ELITE)
case 'f':if(the_cmd[chara+1] == 'a') give_gold(id, tid, CSW_FAMAS);else give_gold(id, tid, CSW_FIVESEVEN)
case 'g': switch(the_cmd[chara+1])
{
case '3':give_gold(id, tid, CSW_G3SG1)
case 'a':give_gold(id, tid, CSW_GALIL)
case 'l':give_gold(id, tid, CSW_GLOCK18)
}
case 'k': give_gold(id, tid, CSW_KNIFE)
case 'm':switch(the_cmd[chara+1])
{
case '2':give_gold(id, tid, CSW_M249)
case '3':give_gold(id, tid, CSW_M3)
case '4':give_gold(id, tid, CSW_M4A1)
case 'a':give_gold(id, tid, CSW_MAC10)
case 'p':give_gold(id, tid, CSW_MP5NAVY)
}
case 'p':if(the_cmd[chara+1] == '2') give_gold(id, tid, CSW_P228);else give_gold(id, tid, CSW_P90)
case 's':switch(the_cmd[chara+4])
{
case 't':give_gold(id, tid, CSW_SCOUT)
case '0':give_gold(id, tid, CSW_SG550)
case '2':give_gold(id, tid, CSW_SG552)
}
case 't': give_gold(id, tid, CSW_TMP)
case 'u':if(the_cmd[chara+1] == 'm') give_gold(id, tid, CSW_UMP45);else give_gold(id, tid, CSW_USP)
case 'x':give_gold(id, tid, CSW_XM1014)
}
the_cmd = ""
return is_console?PLUGIN_HANDLED:PLUGIN_CONTINUE
}
public give_gold(id, tid, wepID)
{
if(!AllowedWeps[wepID]) return PLUGIN_HANDLED
if(tid < 1 )
{
if(is_user_alive(id))
tid = id
else if(is_user_alive(pev(id, pev_iuser2)))
tid = pev(id, pev_iuser2)
else return PLUGIN_HANDLED
}
new weaponName[30]
get_weaponname(wepID, weaponName, charsmax(weaponName))
if(id != -2)
{
new cost2, flags = get_user_flags(id), money
if(gHas_Golden[wepID][tid])
{
if(id != 0) ColorChat(id, RED, "^4[^1Goldens^4] ^3Sorry, ^4%s ^3already have this ^1Golden^3!", tid==id?"you":(is_user_bot(tid)?"this bot":"this player"))
give_item(tid, weaponName)
cs_set_user_bpammo(tid, wepID, gMaxBPAmmo[wepID])
return PLUGIN_HANDLED
}
if(~flags & FreeGold)
{
money = cs_get_user_money(id)
if(flags & flaga)
{
cost2 = floatround( (costa * 0.5) * PriceBalance[wepID]) // 50% lower price
} else {
cost2 = floatround( costa * PriceBalance[wepID] )
}
if(money < cost2)
{
ColorChat(id, RED, "^4[^1Goldens^4] ^3Sorry, not enough ^4money^1(cost ^4%d^3$^1)",cost2)
return PLUGIN_HANDLED
}
cs_set_user_money(id, money-cost2)
}
if(!is_user_alive(tid) && GoldOnSpawn[tid] == 0)
GoldOnSpawn[tid] = wepID
if(texta[tid][0] != '^0')
add(texta[tid], 50, ", ");
add(texta[tid], 50, weaponName[7])
if(tid == id)
{
// Switch to the given weapon
engclient_cmd(tid, weaponName)
if(!task_exists(tid+SPAMA))
set_task(0.1, "Less_Spam", tid+SPAMA)
}
else
{
if(!task_exists(tid+SPAMA2))
{
new param[1]
param[0] = id
set_task(0.1, "Less_Spam2", tid+SPAMA2, param, 1)
}
}
}
gHas_Golden[wepID][tid] = true
give_item(tid, weaponName)
if(wepID != CSW_KNIFE)
cs_set_user_bpammo(tid, wepID, gMaxBPAmmo[wepID])
cs_set_weapon_ammo(wepid2[tid], gMaxClipAmmo[wepID])
if(pev_valid(wepid2[tid])) ModelChange(wepid2[tid])
set_user_rendering(tid, kRenderFxGlowShell, 255, 215, 0, kRenderNormal, 25)
GoldBackup[tid] = wepID
set_task(4.0, "StopBackup", tid)
return PLUGIN_HANDLED
}
public StopBackup(id)
{
GoldBackup[id] = 0
}
public Less_Spam(id)
{
id -= SPAMA
#if !defined COLOR
ColorChat(0, Color:GREY, "^4[^1Goldens^4] ^3%s^1 got a Golden ^4%s", user_name[id], texta[id])
#elseif
ColorChat(0, Color:colornames_name(id, name22), "^4[^1Goldens^4] %s^1 got a Golden ^4%s", name22, texta[id])
#endif
texta[id] = ""
}
public Less_Spam2(param[1], id)
{
id -= SPAMA2
#if !defined COLOR
ColorChat(0, Color:GREY, "^4[^1Goldens^4] ^3%s^1 gave ^3%s^1 a golden ^4%s", user_name[param[0]], user_name[id], texta[id])
#elseif
colornames_name(id, name22)
ColorChat(0, Color:colornames_name(param[0], GiverName), "^4[^1Goldens^4] %s^1 gave %s^1 a golden %s", GiverName, name22, texta[id])
#endif
texta[id] = ""
}
/*public fw_SetModel(entity, model[])
{
if(!World_Models_On)
return FMRES_IGNORED
if(!pev_valid(entity)) // check if its a valid entity or else we'll get errors
return FMRES_IGNORED
new wid = get_pdata_int(entity, 43, 4)
if(wid < 1 && wid> 32) return FMRES_IGNORED
if(!equali(model, Modelite[wid][2])) // checks if it's the model we want to change
return FMRES_IGNORED
new id = pev(entity, pev_owner)
if( gHas_Golden[wid][id] == false)
return FMRES_IGNORED
set_pev( id, pev_weaponmodel, engfunc( EngFunc_AllocString, Modelite[wid][1] ))
return FMRES_SUPERCEDE
}*/
public fw_Killed(id)
{
new wepID
if((wepID=GoldBackup[id]) && GoldOnSpawn[id] == 0)
GoldOnSpawn[id] = wepID
for(wepID=CSW_P228;wepID<=CSW_P90;wepID++)
{
gHas_Golden[wepID][id] = false
}
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits)
{
if(!is_user_connected(attacker)
|| damagebits & (1<<24)) return HAM_IGNORED
if(gHas_Golden[get_user_weapon(attacker)][attacker])
{
SetHamParamFloat(4, damage * 3.0)
return HAM_HANDLED
}
return HAM_IGNORED
}
public fwTraceLine(const Float:start[3], Float:dest[3], ignore_monsters, id, ptr)
{
if(ignore_monsters|| !is_user_alive(id)) return FMRES_IGNORED
static g_normal_ptr[33]
if (!g_normal_ptr[id]){g_normal_ptr[id] = ptr;return FMRES_IGNORED;}
if (ptr == g_normal_ptr[id] )return FMRES_IGNORED
if(~pev(id, pev_button) & IN_ATTACK || !pev_valid(wepid2[id])) return FMRES_IGNORED
new wepidto = get_pdata_int(wepid2[id], 43, 4)
if(wepidto > 32 && wepidto < 1) return FMRES_IGNORED
if(!gHas_Golden[ wepidto ][id]) return FMRES_IGNORED
get_tr2(ptr, TR_vecEndPos, dest);
//xs_vec_mul_scalar(dest, 10.0, dest);
static Float:fired_particle_start_origin[3], Float:eyes[3]
pev(id, pev_origin, fired_particle_start_origin);
pev(id, pev_view_ofs,eyes)
xs_vec_add(fired_particle_start_origin, eyes, fired_particle_start_origin)
if(get_distance_f(fired_particle_start_origin, start) > 10.0) return FMRES_IGNORED // This is cuz of the Double pistols
if(get_distance_f(start, dest) > 4000.0) return FMRES_IGNORED // This is cuz of the Double pistols
//if(floatabs( get_pdata_float( wepid2[id], 46, 4)) < 0.001) return FMRES_IGNORED
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMPOINTS)
engfunc(EngFunc_WriteCoord, start[0])
engfunc(EngFunc_WriteCoord, start[1])
engfunc(EngFunc_WriteCoord, start[2])
engfunc(EngFunc_WriteCoord, dest[0])
engfunc(EngFunc_WriteCoord, dest[1])
engfunc(EngFunc_WriteCoord, dest[2])
//write_coord(dest[0]),write_coord(dest[1]),write_coord(dest[2])
write_short(beama)
write_byte(1)
write_byte(5)
write_byte(1)
write_byte(10) // width
write_byte(0)
write_byte( 255 )
write_byte( 215 )
write_byte( 0 )// r, g, b
write_byte(200)
write_byte(1)
message_end()
return FMRES_IGNORED
}
public plugin_precache()
{
new i, gConfigFile[50], iFileP, FullCmd[50], cmd[50], var[50];
for(i=0; i < size2; i++)
pcvar[i] = register_cvar(pcvar_name[i], "1");
get_configsdir(gConfigFile, sizeof gConfigFile - 1);
add(gConfigFile, sizeof gConfigFile - 1, "/multi-golden.cfg");
iFileP = fopen(gConfigFile, "rt")
while(!feof(iFileP)){
fgets(iFileP, FullCmd, charsmax(FullCmd))
remove_quotes(FullCmd)
if( !FullCmd[0] || FullCmd[0] == ';' || FullCmd[0] == '/' && FullCmd[1] == '/' || FullCmd[0] != 'g')
continue;
parse(FullCmd, cmd, charsmax(cmd), var, charsmax(var))
set_cvar_string(cmd,var)
}
fclose(iFileP)
beama = precache_model("sprites/dot.spr")
for(i=0; i < size2-(EXTRA_CVARS-1);i++)
if(( pcvar_nums[i] = get_pcvar_num(pcvar[i]) ) != 0)switch(i-1){
case -1: World_Models_On = bool:(pcvar_nums[i])
case 0:{if(file_exists(Modelite[CSW_AK47][0])) precache_model(Modelite[CSW_AK47][0]);else pcvar_nums[i] = 0;
if(World_Models_On) if(file_exists(Modelite[CSW_AK47][1])) precache_model(Modelite[CSW_AK47][1]);else pcvar_nums[i] = 0;}
case 1:{if(file_exists(Modelite[CSW_AUG][0])) precache_model(Modelite[CSW_AUG][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_AUG][1])) precache_model(Modelite[CSW_AUG][1]);else pcvar_nums[i] = 0;}
case 2:{if(file_exists(Modelite[CSW_AWP][0])) precache_model(Modelite[CSW_AWP][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_AWP][1])) precache_model(Modelite[CSW_AWP][1]);else pcvar_nums[i] = 0;}
case 3:{if(file_exists(Modelite[CSW_DEAGLE][0]))precache_model(Modelite[CSW_DEAGLE][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_DEAGLE][1])) precache_model(Modelite[CSW_DEAGLE][1]);else pcvar_nums[i] = 0;}
case 4:{if(file_exists(Modelite[CSW_ELITE][0]))precache_model(Modelite[CSW_ELITE][0]);else pcvar_nums[i] = 0
if(World_Models_On)if(file_exists(Modelite[CSW_ELITE][1]))precache_model(Modelite[CSW_ELITE][1]);else pcvar_nums[i] = 0;}
case 5:{if(file_exists(Modelite[CSW_FAMAS][0])) precache_model(Modelite[CSW_FAMAS][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_FAMAS][1])) precache_model(Modelite[CSW_FAMAS][1]);else pcvar_nums[i] = 0;}
case 6:{if(file_exists(Modelite[CSW_FIVESEVEN][0]))precache_model(Modelite[CSW_FIVESEVEN][0]);else pcvar_nums[i] = 0
if(World_Models_On)if(file_exists(Modelite[CSW_FIVESEVEN][1])) precache_model(Modelite[CSW_FIVESEVEN][1]);else pcvar_nums[i] = 0;}
case 7:{if(file_exists(Modelite[CSW_G3SG1][0]))precache_model(Modelite[CSW_G3SG1][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_G3SG1][1])) precache_model(Modelite[CSW_G3SG1][1]);else pcvar_nums[i] = 0;}
case 8:{if(file_exists(Modelite[CSW_GALIL][0])) precache_model(Modelite[CSW_GALIL][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_GALIL][1])) precache_model(Modelite[CSW_GALIL][1]);else pcvar_nums[i] = 0;}
case 9:{if(file_exists(Modelite[CSW_GLOCK18][0])) precache_model(Modelite[CSW_GLOCK18][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_GLOCK18][1])) precache_model(Modelite[CSW_GLOCK18][1]);else pcvar_nums[i] = 0;}
case 10:{if(file_exists(Modelite[CSW_KNIFE][0]))precache_model(Modelite[CSW_KNIFE][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_KNIFE][1])) precache_model(Modelite[CSW_KNIFE][1]);else pcvar_nums[i] = 0;}
case 11:{if(file_exists(Modelite[CSW_M3][0])) precache_model(Modelite[CSW_M3][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_M3][1])) precache_model(Modelite[CSW_M3][1]);else pcvar_nums[i] = 0;}
case 12:{if(file_exists(Modelite[CSW_M4A1][0])) precache_model(Modelite[CSW_M4A1][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_M4A1][1])) precache_model(Modelite[CSW_M4A1][1]);else pcvar_nums[i] = 0;}
case 13:{if(file_exists(Modelite[CSW_MAC10][0])) precache_model(Modelite[CSW_MAC10][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_MAC10][1])) precache_model(Modelite[CSW_MAC10][1]);else pcvar_nums[i] = 0;}
case 14:{if(file_exists(Modelite[CSW_MP5NAVY][0])) precache_model(Modelite[CSW_MP5NAVY][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_MP5NAVY][1])) precache_model(Modelite[CSW_MP5NAVY][1]);else pcvar_nums[i] = 0;}
case 15:{if(file_exists(Modelite[CSW_M249][0])) precache_model(Modelite[CSW_M249][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_M249][1])) precache_model(Modelite[CSW_M249][1]);else pcvar_nums[i] = 0;}
case 16:{if(file_exists(Modelite[CSW_P228][0])) precache_model(Modelite[CSW_P228][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_P228][1])) precache_model(Modelite[CSW_P228][1]);else pcvar_nums[i] = 0;}
case 17:{if(file_exists(Modelite[CSW_P90][0])) precache_model(Modelite[CSW_P90][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_P90][1])) precache_model(Modelite[CSW_P90][1]);else pcvar_nums[i] = 0;}
case 18:{if(file_exists(Modelite[CSW_SCOUT][0])) precache_model(Modelite[CSW_SCOUT][0]);else pcvar_nums[i] = 0
if(World_Models_On)if(file_exists(Modelite[CSW_SCOUT][1]))precache_model(Modelite[CSW_SCOUT][1]);else pcvar_nums[i] = 0;}
case 19:{if(file_exists(Modelite[CSW_SG550][0])) precache_model(Modelite[CSW_SG550][0]);else pcvar_nums[i] = 0
if(World_Models_On)if(file_exists(Modelite[CSW_SG550][1]))precache_model(Modelite[CSW_SG550][1]);else pcvar_nums[i] = 0;}
case 20:{if(file_exists(Modelite[CSW_SG552][0])) precache_model(Modelite[CSW_SG552][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_SG552][1])) precache_model(Modelite[CSW_SG552][1]);else pcvar_nums[i] = 0;}
case 21:{if(file_exists(Modelite[CSW_TMP][0])) precache_model(Modelite[CSW_TMP][0]);else pcvar_nums[i] = 0
if(World_Models_On)if(file_exists(Modelite[CSW_TMP][1])) precache_model(Modelite[CSW_TMP][1]);else pcvar_nums[i] = 0;}
case 22:{if(file_exists(Modelite[CSW_UMP45][0]))precache_model(Modelite[CSW_UMP45][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_UMP45][1])) precache_model(Modelite[CSW_UMP45][1]);else pcvar_nums[i] = 0;}
case 23:{if(file_exists(Modelite[CSW_USP][0])) precache_model(Modelite[CSW_USP][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_USP][1])) precache_model(Modelite[CSW_USP][1]);else pcvar_nums[i] = 0;}
case 24:{if(file_exists(Modelite[CSW_XM1014][0])) precache_model(Modelite[CSW_XM1014][0]);else pcvar_nums[i] = 0
if(World_Models_On) if(file_exists(Modelite[CSW_XM1014][1])) precache_model(Modelite[CSW_XM1014][1]);else pcvar_nums[i] = 0;}
case 25:if((costa = pcvar_nums[i]) == 1) costa = 10000;}
}
public client_connect(id){
new name[50]
get_user_name(id, name, 49)
copy(user_name[id], 49, name)
//fw_Killed(id)
}
public client_infochanged(id)
{
if(!is_user_connected(id))
return
new g_old_name[50], g_name[50];
get_user_name(id, g_old_name, charsmax(g_old_name))
get_user_info(id, "name", g_name, charsmax(g_name))
if(!equal(g_name, g_old_name))
{
copy(user_name[id], 49, g_name)
}
}
public client_disconnect(id)
user_name[id] = ""