SA-MP Forums Archive
CallRemoteFunction for strings - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CallRemoteFunction for strings (/showthread.php?tid=105380)



CallRemoteFunction for strings - help! - 28.10.2009

Hello.

I have a command for admins that makes a chosen player type a string, and when I make it to this:

Код:
CallRemoteFunction("OnPlayerText", "s", para1, string);
The server crashes.

Can someone please help?


Re: CallRemoteFunction for strings - Correlli - 28.10.2009

Check the wiki example - https://sampwiki.blast.hk/wiki/CallRemoteFunction

You're formatting one variable but you have inserted two arguments.


Re: CallRemoteFunction for strings - help! - 28.10.2009

Can you give me an example of what I should have?

I saw the wiki one and I was confused, because how will it define the player that is doing the OnPlayerText command?


Re: CallRemoteFunction for strings - help! - 29.10.2009

I also have another function similar to this one, except it only works for commands.

Код:
CallRemoteFunction("OnPlayerCommandText", "is", para1, result);
This worked fine, so I copied it and tried to make it for text, but it didn't work.


Re: CallRemoteFunction for strings - Correlli - 29.10.2009

pawn Код:
CallRemoteFunction("OnPlayerText", "is", playerid, string);
"i" is for integers - playerid,
"s" is for strings - string.


Re: CallRemoteFunction for strings - help! - 29.10.2009

Thank you so much!

It works!!