problem
#1

i have a problem with /me command.
it works, but it writes only one word.
code:
PHP код:
    if(strcmpcmd"/me"true ) == )
    {
    if(
IsPlayerConnected(playerid))
    {
        new 
result[128];
        
result strtok(cmdtext,idx);
        if(!
strlen(result))
        {
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: /me [action]");
            return 
1;
        }
        new 
sendername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridsendernamesizeof(sendername));
        new 
string[128];
        
format(string,sizeof(string),"*%s %s",sendernameresult);
        
ProxDetector(20.0playeridstringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
    }
    return 
1;
    } 
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)