Raised This Month: $ Target: $400
 0% 

send string to native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Min2liz
AlliedModders Donor
Join Date: Feb 2008
Location: Street
Old 05-02-2010 , 12:06   send string to native
Reply With Quote #1

Hi,

can anyone explain what I'm doing wrong or maybe can give short script for noob how need to do this.

i have main plugin with natives and sub-plugin with command /test For now I want to debug what's really works and try to print everything what I send to native, but don't work.

Main plugin:

Code:
public plugin_natives() {
	register_native("up_get_info","naive_get_info");
}
public naive_get_info(iPlugin,iParam) {	
	new id = get_param(1);
	new key[64];
	get_string(2,key,63);
	new txt[255]
	formatex(txt,254,"Key: %s ID: %s",key,id);
	return txt;
}
upanel.inc:

Code:
native up_get_info(id,key[])
sub-plugin:

Code:
#include <amxmodx>
#include <amxmisc>
#include <upanel>

public plugin_init() {	
	register_clcmd("say /test", "cmd_test");
	
}
public cmd_test(id) {
	client_print(id,print_chat,"test: %s",up_get_info(id,"test"));	
}
and I get strange things here. Of course have no idea why

Code:
test: <
Min2liz :  /test
Min2liz is offline
 


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 03:41.


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