Raised This Month: $ Target: $400
 0% 

Add Armor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ardonicek
Senior Member
Join Date: Feb 2013
Location: My home
Old 08-24-2013 , 07:04   Add Armor
Reply With Quote #1

Hello, i have this:

Code:
if(Level[id] == 10)
    { 
	cs_set_user_armor( id, 5, CS_ARMOR_VESTHELM )
    }
It sets armor to 5 every round, but i need to add +5 armor every round with maximum of 100 armor.

Thanks.
__________________
Latest plugin: dHUD Round | Timeleft
Ardonicek is offline
Send a message via ICQ to Ardonicek Send a message via Skype™ to Ardonicek
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-24-2013 , 07:13   Re: Add Armor
Reply With Quote #2

cs_get_user_armor()+5
__________________
Black Rose is offline
Ardonicek
Senior Member
Join Date: Feb 2013
Location: My home
Old 08-24-2013 , 07:20   Re: Add Armor
Reply With Quote #3

Doesn't work.

Error: Number of arguments does not match definition on line 567
__________________
Latest plugin: dHUD Round | Timeleft
Ardonicek is offline
Send a message via ICQ to Ardonicek Send a message via Skype™ to Ardonicek
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 08-24-2013 , 08:00   Re: Add Armor
Reply With Quote #4

PHP Code:
cs_set_user_armor(id, (cs_get_user_armor(id) + 5), CS_ARMOR_VESTHELM); 
__________________
simanovich is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-24-2013 , 08:11   Re: Add Armor
Reply With Quote #5

It was an example, you were supposed to look up the function.
__________________
Black Rose is offline
Ardonicek
Senior Member
Join Date: Feb 2013
Location: My home
Old 08-24-2013 , 08:13   Re: Add Armor
Reply With Quote #6

Quote:
Originally Posted by simanovich View Post
PHP Code:
cs_set_user_armor(id, (cs_get_user_armor(id) + 5), CS_ARMOR_VESTHELM); 
Doesn't work too, same error, idk why.
__________________
Latest plugin: dHUD Round | Timeleft
Ardonicek is offline
Send a message via ICQ to Ardonicek Send a message via Skype™ to Ardonicek
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-24-2013 , 08:16   Re: Add Armor
Reply With Quote #7

If you look the function up you will find your answer pretty fast.
__________________
Black Rose is offline
Winchester90
Senior Member
Join Date: May 2013
Location: Dale! RG4L Baby
Old 08-24-2013 , 08:45   Re: Add Armor
Reply With Quote #8

Add the include fun
__________________
Proyectos No comercio XD
Zombie Resurection 1.0 (45%)
Winchester90 is offline
Ardonicek
Senior Member
Join Date: Feb 2013
Location: My home
Old 08-24-2013 , 09:14   Re: Add Armor
Reply With Quote #9

#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <colorchat>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>


My includes are okay.
__________________
Latest plugin: dHUD Round | Timeleft
Ardonicek is offline
Send a message via ICQ to Ardonicek Send a message via Skype™ to Ardonicek
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-24-2013 , 09:55   Re: Add Armor
Reply With Quote #10

If you still haven't figured it out...
Code:
new CsArmorType:armortype; cs_set_user_armor(id, cs_get_user_armor(id, armortype) + 5, armortype);
__________________

Last edited by Black Rose; 08-24-2013 at 09:55.
Black Rose 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 18:56.


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