Often I meet with some small things whose purpose I not understan.
For example 1:
PHP Code:
public forwardClientSpawn_Post( client, attacker, gib )
{
if ( IsPlayer(client) && (get_user_flags(client) & ADMIN_LEVEL_H) )
zp_override_user_model( client, g_vipModelHuman[random_num(0, sizeof g_vipModelHuman - 1)] );
}
What's this for,is it necessary to be there?
example 2:
PHP Code:
public OnPlayerSpawnPost(id)
{
if(is_user_alive(id) && !is_user_zombie(id) && (get_user_flags(id) & VipFlag))
{
new Float:cHealth, Float:cArmor
pev(id, pev_health, cHealth)
pev(id, pev_armorvalue, cArmor)
if(cHealth < VipStartHealth) set_pev(id, pev_health, VipStartHealth);
if(cArmor < VipStartArmor) set_pev(id, pev_armorvalue, VipStartArmor);
cs_set_user_money(id, cs_get_user_money(id)+(2000));
give_item(id, "weapon_hegrenade")
if(!user_has_weapon(id, CSW_HEGRENADE))
give_item(id, "weapon_hegrenade")
//Set player model here.
if(!is_user_zombie(id)) cs_set_player_model(id, VipModel);
}
}
What is the role of a character
somewhere it has(at the end of the sentence) somewhere it does not
Both examples are for vip player model(skin) and in the second case, which I use there is no