Raised This Month: $ Target: $400
 0% 

change the player speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-13-2009 , 06:28   change the player speed
Reply With Quote #1

PHP Code:
/*================================================================================
    
    -----------------------------------
    -*- [ZP] Zombie Classes Example -*-
    -----------------------------------
    
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    
    This is just an example on how to add additional zombie classes in ZP.
    
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

// Zombie Attributes
new const zclass_name[] = { "My Zombie" // name
new const zclass_info[] = { "My Stats" // description
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 1800 // health
const zclass_speed 190 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback

// Class IDs
new g_zclassid1

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
    
register_plugin("[ZP] Additional Zombie Classes""0.1""Example")
    
register_event("DeathMsg""hc_death""b")
    
register_event("HLTV""hc_newround""a""1=0""2=0")
    
    
// Register the new class and store ID for reference
    
g_zclassid1 zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    
}

// User Infected forward
public zp_user_infected_post(idinfector)
{
    if(!
is_user_alive(id))
        return;
    
    
// Check if the infected player is using our custom zombie class
    
if (zp_get_user_zombie_class(id) == g_zclassid1)
    {
        
set_pev(idpev_bInDuck1)
        
console_cmd(id"+duck")
        
client_print(idprint_chat"[ZP] You're using a headcrab class!")
    }
}

public 
hc_death(id)
{
    if(
is_user_alive(id))
        return 
PLUGIN_HANDLED
    
    set_pev
(idpev_bInDuck0)
    
console_cmd(id"-duck")
    
console_cmd(id"-duck")
    
    return 
PLUGIN_HANDLED
}

public 
hc_newround()
{
    
set_pev(idpev_bInDuck0)
    
console_cmd(id"-duck")
    
console_cmd(id"-duck")

How to change the player speed if the player is duck ???
thanks for you help.
Anggara_nothing is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:16.


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