Raised This Month: $51 Target: $400
 12% 

Give item function


Post New Thread Reply   
 
Thread Tools Display Modes
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-20-2011 , 22:14   Re: Give item function
Reply With Quote #11

what is it ?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-20-2011 , 22:15   Re: Give item function
Reply With Quote #12

before you use a variable, you need to define it. or it means nothing no matter how you call it. "id" "player" is not specific inner keyword of pawn, so they must be defined before using. in your case they comes as parameter of a function. so you should make the name same with the parameter, id or player, choose one.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-20-2011 , 22:19   Re: Give item function
Reply With Quote #13

PHP Code:
public GiveNade(id)
{
    
give_item(id"weapon_hegrenade")
    
cs_set_user_bpammo(idWEPget_pcvar_num(cvar_he_count)
    
give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idWEP_1get_pcvar_num(cvar_fb_count)     
    
give_item(id"weapon_smokegrenade")
    
cs_set_user_bpammo(idWEP_2get_pcvar_num(cvar_sg_count)

??
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-20-2011 , 22:20   Re: Give item function
Reply With Quote #14

right
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-20-2011 , 22:24   Re: Give item function
Reply With Quote #15

but still error .
Code:
<33 -- 34> : error 001 : expected token ",", but found "-identifier-"
Full code

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Alot of nade"
#define VERSION "0.2"
#define AUTHOR "JoKeR LauGh"
#define WEP CSW_HEGRENADE
#define WEP_1 CSW_FLASHBANG
#define WEP_2 CSW_SMOKEGRENADE

/* CVars */

new cvar_he_count cvar_fb_count cvar_sg_count

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /nade""GiveNade")
    
    
cvar_he_count register_cvar("HE Count""15")
    
cvar_fb_count register_cvar("FB Count""15")
    
cvar_sg_count register_cvar("SG Count""15")
}

public 
GiveNade(id)
{
    
give_item(id"weapon_hegrenade")
    
cs_set_user_bpammo(idWEPget_pcvar_num(cvar_he_count)
    
give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idWEP_1get_pcvar_num(cvar_fb_count)     
    
give_item(id"weapon_smokegrenade")
    
cs_set_user_bpammo(idWEP_2get_pcvar_num(cvar_sg_count)

__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.

Last edited by JoKeR LauGh; 10-20-2011 at 22:25.
JoKeR LauGh is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-20-2011 , 22:41   Re: Give item function
Reply With Quote #16

all brackets, braces, and parentheses must have a matching closing bracket, brace, or parenthesis, respectively.
__________________

Last edited by fysiks; 10-20-2011 at 22:41.
fysiks is online now
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-20-2011 , 23:37   Re: Give item function
Reply With Quote #17

thx . I forgot another 1 brackets . thanks ;)
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
!Morte
Veteran Member
Join Date: May 2010
Old 10-21-2011 , 09:52   Re: Give item function
Reply With Quote #18

You forget close three parentheses
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.

Last edited by !Morte; 10-21-2011 at 09:53.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-21-2011 , 10:18   Re: Give item function
Reply With Quote #19

I know thanks .
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh 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 14:41.


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