15.02.2012, 19:27
Hello reader,
I am really new to PAWN but my final goal is to create a RP server, I just try to script things and get them working etc etc. Now my problem is, I don't know how to get a player's text. Like the player types "/me walks" and then "/me" is the command and the typed text behind the command would be " walks".
This is the currently used code:
Yes I am aware that with this code it will send the command text only to the player who typed it and that I have to add a radius how far players around the players who typed the command see it etc etc but for now my only concern is to get the player's typed text so it would work. I hope someone can help me with this
.
Best regards,
Jesse
I am really new to PAWN but my final goal is to create a RP server, I just try to script things and get them working etc etc. Now my problem is, I don't know how to get a player's text. Like the player types "/me walks" and then "/me" is the command and the typed text behind the command would be " walks".
This is the currently used code:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/me", cmdtext, true, 3) == 0) { new string[128]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s .", RemoveUnderScore(playerid)); SendClientMessage(playerid, COLOR_PURPLE, string); return 1; } if (strcmp("/act", cmdtext, true, 4) == 0) { new string[128]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), ". (( %s ))", RemoveUnderScore(playerid)); SendClientMessage(playerid, COLOR_PURPLE, string); return 1; } return 0; }

Best regards,
Jesse