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
#2

PHP код:
if(strcmp(cmd"/me"true) == 0
    { 
        new 
mynew[1024];
        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(mynewsizeof(mynew), "* %s %s"GetName(playerid), result); 
        
ProxDetector(30.0playeridmynewCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
        return 
1
    } 
Try to replace this code man xD
Reply
#3

Quote:
Originally Posted by SequenceCuz
Посмотреть сообщение
PHP код:
if(strcmp(cmd"/me"true) == 0
    { 
        new 
mynew[1024];
        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(mynewsizeof(mynew), "* %s %s"GetName(playerid), result); 
        
ProxDetector(30.0playeridmynewCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
        return 
1
    } 
Try to replace this code man xD
Doesnt work....
Reply
#4

Split the message.
Reply
#5

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Split the message.
Isn't that what he is asking to do? -_-
Reply
#6

Quote:
Originally Posted by Nathan_Taylor
Посмотреть сообщение
Isn't that what he is asking to do? -_-
Yep, he can ****** it. I can find results about it.
Reply
#7

Can someone just to edit my command to be 2 lines?
I really need it , and if someone will do it once I will learn how to do it.
Please
Reply
#8

The answer to your problem is to not use OPCT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)