Raised This Month: $ Target: $400
 0% 

Fake Natives (Solved)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-06-2006 , 03:39   Fake Natives (Solved)
Reply With Quote #1

How come, when you register a fake native, it doesn't pass a string through correctly?


Inc. - Registered INC file
Code:
native remorp_server_changelocks(id,targetname[]);

BuyMod - Plugin sending the command
The string is formatted correctly, so I know it is not the formatting.
Code:
remorp_server_changelocks(id,targetname)

KeyMod -
Code:
public plugin_natives() {     register_library ( "RemoRPKeyMod" )     register_native("remorp_server_changelocks","server_changelocks",1) } public server_changelocks(id,targetname[]) {     client_print(0,print_chat,"%s",targetname)     new targetname = param_convert(2)     client_print(0,print_chat,"%i",targetname)

The problem is

The first print chat on the changelocks command prints:
;
Then the second one prints
1

How can I fix this, if possible? Thanks.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 03-06-2006 , 08:56  
Reply With Quote #2

I believe you have to:
Code:
public server_changelocks(id,targetname[]) {     param_convert(1)     client_print(0,print_chat,"%s",targetname)     new target = str_to_num(targetname)     client_print(0,print_chat,"%i",target)     ... }
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-06-2006 , 15:49  
Reply With Quote #3

The targetname needs to be a string, not a variable, I was just testing both the Integer and String Values.

Now it just returns a large number.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
BAILOPAN
Join Date: Jan 2004
Old 03-06-2006 , 17:30  
Reply With Quote #4

Code:
public server_changelocks(id, targetname[]) {     param_convert(2)     client_print(0,print_chat,"%s",targetname)     new targetname = param_convert(2)     client_print(0,print_chat,"%i",targetname)
__________________
egg
BAILOPAN is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-06-2006 , 22:01  
Reply With Quote #5

Ty. Worked.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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 20:27.


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