AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem wyth zombie zoom (https://forums.alliedmods.net/showthread.php?t=240575)

Krtola 05-18-2014 06:41

Problem wyth zombie zoom
 
PHP Code:

#include <amxmodx>
#include <biohazard>

#define EKLENTI "Zombi Gozu"
#define VERSIYON "1.0"
#define YAZAR "Optimist"

new gmsgSetFOV;

public 
plugin_init() {
    
register_plugin(EKLENTIVERSIYONYAZAR)
    
    
register_cvar("zombi_gozu""116")
    
gmsgSetFOV get_user_msgid("SetFOV")
}
public 
event_infect(id) {
    if(
is_user_alive(id)) {
        
zombigoz(id)
    }
}
public 
zombigoz(id) {
    new 
Vision get_cvar_num("zombi_gozu")
    
message_begin(MSG_ONEgmsgSetFOV, {0,0,0}, id)
    
    
write_byte(Vision)
    
message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 

The problem is that when the zombie respawn no more zoom for him.How to fix that after respawn zombie have zoom look?

Flick3rR 05-18-2014 06:48

Re: Problem wyth zombie zoom
 
Attach the biohazard.inc here, so we can take a look at it and help...

Krtola 05-18-2014 06:53

Re: Problem wyth zombie zoom
 
This is biohazard.inc
PHP Code:

/* Biohazard functions
*
*  by Cheap_Suit

*  This file is provided as is (no warranties).
*/

#if defined _biohazard_included
    #endinput
#endif
#define _biohazard_included

#pragma reqlib "biohazardf"

/* Returns the mods status */
stock is_biomod_active()
{
    if(!
cvar_exists("bh_enabled"))
    {
        
log_amx("Cvar: ^"bh_enabled^" does not exist.")
        return 
0
    
}
    return 
get_cvar_num("bh_enabled")
}

/* Called when a survivor is infected */
forward event_infect(victimattacker)

/* Called when the game starts */
forward event_gamestart()

/* Returns true if the game has started */
native bool:game_started()

/* Makes a user zombie */
native infect_user(victimattacker)

/* Makes a user human */
native cure_user(index)

/* Infect user before game starts */
native preinfect_user(indexbool:yesno)

/* Returns 1 if user is a zombie */
native is_user_zombie(index)

/* Returns 1 if the user is infected (before game)*/
native is_user_infected(index)

/* Returns user zombie class */
native get_user_class(index)

/* Returns zombie class id, -1 otherwise */
native register_class(classname[], description[])

/* Sets zombie player model */
native set_class_pmodel(classidplayer_model[])

/* Sets zombie weapon model */
native set_class_wmodel(classidweapon_model[])

/* Returns zombie class id */
native get_class_id(classname[])

#define DATA_HEALTH      0  //Health value
#define DATA_SPEED       1  //Speed value
#define DATA_GRAVITY     2  //Gravity multiplier
#define DATA_ATTACK      3  //Zombie damage multiplier
#define DATA_DEFENCE     4  //Bullet damage multiplier
#define DATA_HEDEFENCE   5  //HE damage multiplier
#define DATA_HITSPEED    6  //Pain speed multiplier
#define DATA_HITDELAY    7  //Pain speed delay value
#define DATA_REGENDLY    8  //Regeneration delay value
#define DATA_HITREGENDLY 9  //Pain regeneration delay value
#define DATA_KNOCKBACK   10 //Knockback multiplier

/* Return/set value of zombie class data */
native Float:get_class_data(classiddataid)
native set_class_data(classiddataidFloat:value



All times are GMT -4. The time now is 09:47.

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