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
__________________