Send MSG to RCON when player typ a command?
#1

Hi!!!
Here i am :P
a little time ago, i was trying to make a script that send an messgae to RCON when player type a command. like this:
If somebody typ this: /teles
Then the RCON will see this: [player name] typed: /teles
or like this:
/test123
The RCON will see this: [player name] typed: /test123
But in my script, i got 9 errors in one line
I AM A NOOB IN SCRITING!!
Can somebody help me making this??
THANX!!!!!!!
cya

-EDIT: I mean that it shows it ingame!! And not with only /teles cmds but i mean EVERY THING they type! so also things like this: /blahblah123
Reply
#2

Quote:
Originally Posted by ► James_Alex
use printf
example
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
printf("%s has typed %s", name, cmdtext);
if(strcmp(cmdtext, "/teles", true) == 0)
{
// bla bla bla
}
return 0;
}
THANX u very muck for ur reply, but i mean this: the rcon will see it IN GAME!! and i also mean with not only /teles command, but with EVERY cmd!
So also like this: /blahblah123
can u help me
thanx again!
cya
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)