2 Lines command.
#1

I need that when I will write a /me command , so if the command is too long the text will be in 2 lines.
Thanks for the helpers

This is my /me Command!
PHP код:
if(strcmp(cmd"/me"true) == 0)
    {
        new 
length strlen(cmdtext);
        while ((
idx length) && (cmdtext[idx] <= ' ')) {
            
idx++;
        }
        new 
offset idx;
        new 
result[128];
        while ((
idx length) && ((idx offset) < (sizeof(result) - 1))) {
            
result[idx offset] = cmdtext[idx];
            
idx++;
        }
        
result[idx offset] = EOS;
        if(!
strlen(result)) { 
            
SendClientMessage(playerid0xFFFFFFFF" /me [action]");
            return 
1;
        }
        
format(stringsizeof(string), "* %s %s"GetName(playerid), result);
        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        return 
1;
    } 
Reply


Messages In This Thread
2 Lines command. - by orelmanor - 03.04.2013, 15:03
Re: 2 Lines command. - by SequenceCuz - 03.04.2013, 15:35
Re: 2 Lines command. - by orelmanor - 03.04.2013, 15:59
Re: 2 Lines command. - by Konstantinos - 03.04.2013, 16:07
Re: 2 Lines command. - by Nathan_Taylor - 03.04.2013, 16:08
Re: 2 Lines command. - by Konstantinos - 03.04.2013, 16:11
Re: 2 Lines command. - by orelmanor - 03.04.2013, 17:06
Re: 2 Lines command. - by glbracer - 03.04.2013, 18:17

Forum Jump:


Users browsing this thread: 5 Guest(s)