Raised This Month: $ Target: $400
 0% 

Round master


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 06-06-2010 , 06:14   Round master
Reply With Quote #1

Hey, I've made a code that should select a player every round from both teams, and give them +hp +ap +speed, but it doesn't work.

here is my code:

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "Round boss"
#define VERSION "1.0"
#define AUTHOR "addinol"

new Boss:PlayerMode[33];

new 
hpapbspeed

enum Boss
{
    
boss 1
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHamHam_Spawn"player""FwdHamPlayerSpawnPost");
    
hp register_cvar("inch_bosshp","200")
    
ap register_cvar("inch_bossap","200")
    
bspeed register_cvar("inch_bosssp","30.0")
    
register_event("CurWeapon""Event_CurWeapon""be","1=1");
}

public 
FwdHamPlayerSpawnPost(id)
{
   if(
cs_get_user_team(id) == CS_TEAM_T){
        
PlayerMode[id] = Boss:random);
   }else if(
cs_get_user_team(id) == CS_TEAM_CT){
        
PlayerMode[id] = Boss:random);
   }
   if(
PlayerMode[id] == Boss)
   {
       
client_print(idprint_chat"This round you will be the chosen one")
        if(
get_pcvar_num(hp) != 0){
    
set_user_health(id get_pcvar_num(hp));
    }else{
    }
    if(
get_pcvar_num(ap) != 0){
    
set_user_armor(id get_pcvar_num(ap));
    }else{
    }
    }
}


public 
Event_CurWeapon(id)
{
    if(
PlayerMode[id] == Boss)
    {
    if(
get_pcvar_float(bspeed) != 0){
    new 
Float:speed get_user_maxspeed(id) + get_pcvar_float(bspeed);
    
set_user_maxspeed(id speed);
    }else{
    
    }
    
}

Where the hell is problem ?
reinert is offline
 


Thread Tools
Display Modes

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 05:16.


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