Raised This Month: $ Target: $400
 0% 

Calling function from another plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 01-24-2010 , 14:43   Re: Calling function from another plugin
Reply With Quote #4

Quote:
Originally Posted by joropito View Post
PHP Code:
public somelocal(idname[])
{
    if( 
callfunc_begin("someremote","otherplugin.amxx") == 
    {
        
callfunc_push_int(id)
        
callfunc_push_str(name)
        
callfunc_end()
    }

1- begin [setting up call]
2- push [values as parameters]
3- end [setup and do the call]

someremote must be public function in the other plugin.
Thanks very much. It works for me, but not 100%. I have this in the otherplugin.amxx:

PHP Code:
public someremote(id){
    if(
get_pcvar_num(p_game)&&isalive(id)&&notadmin(id)){ 
It works well, till the function isalive comes. This is in isalive:

PHP Code:
public isalive(id){
    if(
is_user_alive(id))return 1
    client_print
(id,"PLUGIN stops here -.- , you aren't alive dude!")
    return 
0

But if I do in the same plugin ( otherplugin.amxx ) a
PHP Code:
register_clcmd 
then it does work and continue also after notadmin...

EDIT: Kid, please get the fuck out if you can't read anything. Think before posting, thanks!
KadiR 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 07:26.


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