Raised This Month: $ Target: $400
 0% 

Bool function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 11-05-2011 , 00:51   Re: Bool function
Reply With Quote #3

For an example, can you change it me in a simple weapongive script?

PHP Code:
public cmdMenu(id)
{
 if( 
got_weapon[id] )
    {
        
client_print(idprint_chat"%L"LANG_PLAYER"HAVEALREADY")
        return 
PLUGIN_CONTINUE
    
}
    
showMenu(id)
    return 
PLUGIN_CONTINUE

and then the switchcase for the weapons:

PHP Code:
    switch(key)
    {
        case 
1:
        {

            
give_item(id"weapon_ak47")
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_AK47,90)
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
got_weapon[id] = true
        

sorry, but i am new @ c++ and i donīt know ALL but i have done a look at many plugins and all what I see is.. well nothing i just trie to fix something and it will work, or not

so what i have tried is to use instead of got_weapon[id], if ( ++NumBuy <= 2 ) in the public_cmdMenu. But NumBuy is undefined

Last edited by STr!ker; 11-05-2011 at 01:01.
STr!ker 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 14:15.


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