CallRemoteFunction for strings
#1

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?
Reply
#2

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

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

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?
Reply
#4

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.
Reply
#5

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

Thank you so much!

It works!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)