Raised This Month: $ Target: $400
 0% 

send string to native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Min2liz
AlliedModders Donor
Join Date: Feb 2008
Location: Street
Old 05-02-2010 , 16:26   Re: send string to native
Reply With Quote #4

At this poin is working:
main plugin:
Code:
public native_get_info(iPlugin,iParam) {	
	new id = get_param(1);
	new key[255]
	get_string(2,key,255);
	set_string(1,key,255);
}
sub-plugin:
Code:
#include <amxmodx>
#include <amxmisc>
#include <upanel>

public plugin_init() {	
	register_clcmd("say /test", "cmd_test");
	
}
public cmd_test(id) {
	new test[255];
	test = "Test";
	up_get_info(id,test)
	client_print(id,print_chat,"test: %s",test);	
}
Maybe it's silly code but it's working. But now, how to change in native this string to anything else. Like if sub-plugin send "test", native return "test2"?

I tryed:
Code:
public native_get_info(iPlugin,iParam) {	
	new id = get_param(1);
	new key[255], test[255]
	get_string(2,key,255);
	test = "Test2";
	set_string(1,test,255);
}
but still get old one string "Test"
Min2liz 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 03:41.


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