Raised This Month: $ Target: $400
 0% 

register_native, return text.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-19-2009 , 13:23   register_native, return text.
Reply With Quote #1

I know I return bad,cuz it returns not a value, so how to return it as a text/text message by playersh[id]?
Cuz I need to put it in another plugin ,something like this :
Second plugin :
PHP Code:
    pos += format(szMotd[pos], 2047-pos"RankShit : %s<br><br>"get_user_sh(id)) 
Include file:
PHP Code:
native get_user_sh(id
First plugin :
PHP Code:
#define MAXSHIT 2

new const RANKSHIT[MAXSHIT][] = { "bull.....""cow....."}

new 
playersh[33];
public 
plugin_natives()
{
    
register_native("get_user_sh""native_get_user_sh"1);

PHP Code:
// Native: return text
public native_get_user_sh(id)
{
    return 
RANKSHIT[playersh[id]];


Last edited by xbatista; 05-19-2009 at 13:30.
xbatista is offline
Send a message via Skype™ to xbatista
 


Thread Tools
Display Modes

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 01:24.


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