Raised This Month: $ Target: $400
 0% 

write own inc's


Post New Thread Reply   
 
Thread Tools Display Modes
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-05-2010 , 10:05   Re: write own inc's
Reply With Quote #11

Quote:
Originally Posted by Xellath View Post
About the reqlib, that is not required unless you're running an outdated version of amxmodx.
yes but i think everyone has 1.8.1 version !

and

Code:
As part of the new Automatic Module Loading, the old compiler pragma  #pragma library has been deprecated. You must now use: 
#pragma reqlib <library>
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-05-2010 , 17:59   Re: get users info
Reply With Quote #12

Your problem was here:
PHP Code:
public plugin_natives( ) 
{     
    
register_native"is_player_leader""_is_player_leader"); 

public 
bool:_is_player_leaderiPluginiParams 
{     
    return 
g_player_is_leaderget_param) ]; 

It should be like this:
PHP Code:
public plugin_natives( ) 
{     
    
register_native"is_player_leader""_is_player_leader" ); // register with style=0, not 1

public 
bool:_is_player_leaderiPluginiParams 
{     
    return 
g_player_is_leaderget_param) ]; 

Or like this:
PHP Code:
public plugin_natives( ) 
{     
    
register_native"is_player_leader""_is_player_leader"); 

public 
bool:_is_player_leaderid // style is 1, so pass params directly
{     
    return 
g_player_is_leaderid ]; 

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-05-2010 , 18:05   Re: write own inc's
Reply With Quote #13

ty. this works without problems.
my problem is to call a function.

g_player_is_leader ist just a variable ( new bool:g_player_is_leader[33] )
but i want to call a public function.

public xxx(id)
{
//....
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-05-2010 , 18:20   Re: write own inc's
Reply With Quote #14

You want to call a function in one plugin from another plugin?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-05-2010 , 19:36   Re: write own inc's
Reply With Quote #15

Yes

in main plugin i have : register_clcmd("say menu", "function")

and i want to call the menu in subplugin.
i can do it with
client_cmd(id,"say menu")
but its better to call the function
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-05-2010 , 19:57   Re: write own inc's
Reply With Quote #16

Use callfunc_* natives.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-08-2010 , 02:29   Re: write own inc's
Reply With Quote #17

ty Solved
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 08:46.


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