problem - 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: problem (
/showthread.php?tid=267368)
problem -
963852741 - 08.07.2011
i have a problem with /me command.
it works, but it writes only one word.
code:
PHP код:
if(strcmp( cmd, "/me", true ) == 0 )
{
if(IsPlayerConnected(playerid))
{
new result[128];
result = strtok(cmdtext,idx);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[128];
format(string,sizeof(string),"*%s %s",sendername, result);
ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
return 1;
}
Re: problem -
Jeffry - 08.07.2011
pawn Код:
if(strcmp( cmd, "/me", true ) == 0 )
{
if(IsPlayerConnected(playerid))
{
if(!strlen(cmdtext[4]))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[128];
format(string,sizeof(string),"*%s %s",sendername, cmdtext[4]);
ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
return 1;
}
Jeffry