Raised This Month: $ Target: $400
 0% 

This code wont work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheCompany
BANNED
Join Date: Aug 2010
Old 08-13-2010 , 18:03   This code wont work
Reply With Quote #1

I can only buy this 1 time per map why?

PHP Code:
else if( equaldata"imperial" ) )
                {
                    new 
armor get_user_armor(id);
                    if( 
armor <= 200 )
                    {
                        new 
authid[32];
                        
get_user_authid(idauthid31);
                        new 
key_exists TrieKeyExists(playeritem_trieauthid);
                        new 
playeritems;
                        if( 
key_exists )
                            
TrieGetCell(playeritem_trieauthidplayeritems);
                            if( 
CheckSAP(idIMPERIAL_SAP) )
                            {
                                
client_print(idprint_chat"[ZP] You bought Imperial Armor.");
                                
SAPMessage(id"Bought Imperial Armor");
                                
set_user_armor(idarmor+IMPERIAL_ARMOR);
                                
TrieSetCell(playeritem_trieauthidplayeritems|TRIE_IMPERIAL);
                            }
                    }
                    else
                        
client_print(idprint_center"You have too much Armor");
                }
                    else
                        
client_print(idprint_center"You have too much Armor");
                } 
And this one can't i even buy it just says: You cannot buy with other sap items!

PHP Code:
fequaldata"tactical" ) )
                {
                    if( 
tactical_count TACTICAL_NUMBER )
                    {
                        if( !
gauntlet[id] && dynamic_deagle[id] && !chicken_pecker[id])
                        {
                            if( 
CheckSAP(idTACTICAL_SAP) )
                            {
                                
client_print(idprint_chat"[ZP] You bought Tactical Shotgun.");
                                
SAPMessage(id"Bought A Tactical Shotgun");
                                
tactical_shotgun[id] = 1;
                                
tactical_count++;
                                
give_item(id"weapon_m3");
                                
has_tactical[id] = true
                            
}
                        }
                        else
                            
client_print(idprint_center"Cannot buy with other sap items!");
                    }
                    else
                        
client_print(idprint_center"Too many Tactical Shotgun's Bought");
                } 
TheCompany is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2010 , 18:39   Re: This code wont work
Reply With Quote #2

1. Either you have too much armor or CheckSAP(id, IMPERIAL_SAP) returns false.
2. One of these is false: !gauntlet[id], dynamic_deagle[id], !chicken_pecker[id]
__________________
fysiks is offline
TheCompany
BANNED
Join Date: Aug 2010
Old 08-13-2010 , 19:52   Re: This code wont work
Reply With Quote #3

Can you fix it? I am a terrible coder.
TheCompany is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 08-13-2010 , 20:21   Re: This code wont work
Reply With Quote #4

Give the entire code then.
RedRobster 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 21:56.


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