Raised This Month: $ Target: $400
 0% 

Acquiring a #define from another plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
JFeldon
Member
Join Date: Feb 2007
Location: United Kingdom
Old 07-16-2008 , 08:57   Acquiring a #define from another plugin
Reply With Quote #1

Hi,

I'm scripting something for TSRP and am calling the itemamount function from HarbuRP_Talkarea.amxx. The 3 parameters are "id","itemid","table". The ID is the player id, no problem. The table is money, no problem again. But the ItemID I want is in a #define in HarbuRP_Talkarea.amxx. I could just get the value of it (Which I believe is 14) and manually use
PHP Code:
callfunc_push_int(14
So if the server owner decides to change the ItemID's (Not likely but possible), the plugin wouldn't work.

Is there anyway I can get the #define from the plugin, put it into a variable in my plugin and then use it in callfunc_push_int?
The define is
PHP Code:
#define CELLPHONE_TWO_ID 14 


The code I wanna use it in is
PHP Code:
Public Function(id)
{
    
callfunc_begin("itemamount","HarbuRP_Talkarea.amxx")
    
callfunc_push_int(id)
    
callfunc_push_int(?????)
    
callfunc_push_str(money)
    
//... 
Also, if there's a more efficient way of doing this tell me


+Karma for helpfullness

-JFeldon
__________________
+Karma if I helped! ;)
JFeldon is offline
Send a message via MSN to JFeldon
 



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 05:32.


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