OnPlayerCommandPerformed - Last character
#1

It's not showing the last character of the command, is this known or...?

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success) return SendClientMessage(playeridCOLOR_WHITEINVALID_CMD);
    new 
commandFile[128], dmy;
    
getdate(ymd);
    
format(commandFilesizeof(commandFile), "Command-logs/Command-logs-%02d-%02d-%d.log"dmy);
    new 
File:cmdlog fopen(commandFileio_readwrite); 
    if(
cmdlog)
    {
        new 
str[156];
        
format(strsizeof(str), "%s - %s, %s\n",TimeDate(), PlayerName(playerid), cmdtext);
        
printf("%s"str);
        
fwrite(cmdlogstr);
        
fclose(cmdlog);    
    }
    return 
1;

For example when I use the command /a -> admin chat, it will log it as '/'

Is there a way around this, or?
Reply
#2

new string[512] or new string[256];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)