Raised This Month: $ Target: $400
 0% 

Human class parameters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-14-2011 , 22:03   Human class parameters
Reply With Quote #1

I'm trying to get at the time the player to select a class win some specific human attributes such as vest, but I'm having problems with the parameters can someone help me?

PHP Code:
/*================================================================================
    
    ----------------------------------
    -*- [ZP] Class: Human: Raptor -*-
    ----------------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <zp50_class_human>

// Raptor Human Attributes
new const humanclass2_name[] = "Human raptor"
new const humanclass2_info[] = "HP-- Speed+ Gravity+"
new const humanclass2_models[][] = { "leet" }
const 
humanclass2_health 50
const Float:humanclass2_speed 1.2
const Float:humanclass2_gravity 1.2

new g_HumanClassID

public plugin_precache()
{
    
register_plugin("[ZP] Class: Human: Raptor"ZP_VERSION_STRING"ZP Dev Team")
    
    
g_HumanClassID zp_class_human_register(humanclass2_namehumanclass2_infohumanclass2_healthhumanclass2_speedhumanclass2_gravity)
    new 
index
    
for (index 0index sizeof humanclass2_modelsindex++)
        
zp_class_human_register_model(g_HumanClassIDhumanclass2_models[index])
}

public 
zp_fw_class_human_select_pre(idattacker)
{
    
set_user_armor(id50)

PHP Code:
public zp_fw_class_human_select_pre(idattacker)
{
    
set_user_armor(id50)

Thanks.
rodrigo286 is offline
Pelita Jaya F.C
Member
Join Date: Oct 2011
Location: Bangkok
Old 11-15-2011 , 00:29   Re: Human class parameters
Reply With Quote #2

hehehhe .
i fixed it for you .
Attached Files
File Type: sma Get Plugin or Get Source (ZP_Human.sma - 123 views - 1.7 KB)
__________________


My Plugins:
Power M4A1
Pelita Jaya F.C is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-15-2011 , 07:34   Re: Human class parameters
Reply With Quote #3

So it works but it is giving the 50 amor for the player's opens the menu, I wish it was only when he selected the class of the plugin, is it possible?

PHP Code:
/*================================================================================ 
     
    ---------------------------------- 
    -*- [ZP] Class: Human: Raptor -*- 
    ---------------------------------- 
     
    This plugin is part of Zombie Plague Mod and is distributed under the 
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details. 
     
================================================================================*/ 

#include <amxmodx> 
#include <cstrike>
#include <zp50_class_human> 

// Raptor Human Attributes 
new const humanclass2_name[] = "Human Raptor" 
new const humanclass2_info[] = "HP-- Speed+ Gravity+" 
new const humanclass2_models[][] = { "leet" 
const 
humanclass2_health 50 
const Float:humanclass2_speed 1.2 
const Float:humanclass2_gravity 1.2 

new g_HumanClassID 

new cvar_amount

public plugin_init()
{
    
cvar_amount register_cvar("Amount of armor""50")
}

public 
plugin_precache() 

    
register_plugin("[ZP] Class: Human: Raptor"ZP_VERSION_STRING"ZP Dev Team"
     
    
g_HumanClassID zp_class_human_register(humanclass2_namehumanclass2_infohumanclass2_healthhumanclass2_speedhumanclass2_gravity
    new 
index 
    
for (index 0index sizeof humanclass2_modelsindex++) 
        
zp_class_human_register_model(g_HumanClassIDhumanclass2_models[index]) 


public 
zp_fw_class_human_select_pre(id

    
cs_set_user_armor(idget_pcvar_num(cvar_amount), CS_ARMOR_KEVLAR
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1066\\ f0\\ fs16 \n\\ par }
*/ 
Thanks.

Last edited by rodrigo286; 11-15-2011 at 07:36.
rodrigo286 is offline
Pelita Jaya F.C
Member
Join Date: Oct 2011
Location: Bangkok
Old 11-15-2011 , 08:04   Re: Human class parameters
Reply With Quote #4

for the players open the menu??? i cant understand
__________________


My Plugins:
Power M4A1
Pelita Jaya F.C is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-15-2011 , 08:23   Re: Human class parameters
Reply With Quote #5

Players receive the armor when they open the human class menu, I need only receive after they choose the class of the script.

Thanks very much.
rodrigo286 is offline
Pelita Jaya F.C
Member
Join Date: Oct 2011
Location: Bangkok
Old 11-15-2011 , 08:58   Re: Human class parameters
Reply With Quote #6

try
Attached Files
File Type: sma Get Plugin or Get Source (ZP_Human.sma - 121 views - 1.8 KB)
__________________


My Plugins:
Power M4A1
Pelita Jaya F.C is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-15-2011 , 09:26   Re: Human class parameters
Reply With Quote #7

The player will receive when you open the menu, I need him to win only when choosing the class human Human Raptor.

Thanks very much.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-15-2011 , 10:57   Re: Human class parameters
Reply With Quote #8

https://forums.alliedmods.net/showthread.php?p=1593905

PHP Code:
public zp_fw_core_spawn_post(id)
{
    if (
zp_class_human_get_current(id) == g_HumanClassID)
    {
        
zp_colored_print(id"You are using^x04Armorer hclass^x01, you now have^x04%s^x01 armor."get_pcvar_num(cvar_armor))
        
set_user_armor(idget_pcvar_num(cvar_armor))
    }

But not work.

Thanks.

PS: Sorry for the double post was an accident.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM

Last edited by rodrigo286; 11-15-2011 at 11:28.
rodrigo286 is offline
Reply



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 08:29.


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