View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-01-2013 , 01:17   Re: Change String value on a native callback?
Reply With Quote #2

Hello Starbish,

you basically have to call SetNativeString() after you set the string to write the string buffer back for the caller.

There is an example in the wiki:
http://wiki.alliedmods.net/Creating_...pting)#Strings

The function FormatNativeString is a formatter function with printf syntax, that parses %s, %d formatters from variable arguments, but to change the string buffer you basically don't need it, except you want to have variable argument formatting support.
It's described in the API Doc.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline