String
#1

Hello.

I have made two commands but i can just type like 5-10 words in them is it becuase string[56]?

PHP код:
CMD:adm(playeridparams[])
{
    if(
pInfo[playerid][pAdmin] < 1) return 0;
    new 
sendername[MAX_PLAYER_NAME], string[56];
    
GetPlayerName(playeridsendernamesizeof(sendername));
    if(
isnull(params)) return SendClientMessage(playerid0xFFFFFFF,"Syntax error.Correct usage: /adm [text]");
    
format(stringsizeof(string), "((Server Action: %s %s ))"sendernameparams);
    
SendClientMessageToAll(0xFF0000C8string);
    return 
1;
}
CMD:ooc(playeridparams[])
{
    new 
sendername[MAX_PLAYER_NAME], string[56];
    
GetPlayerName(playeridsendernamesizeof(sendername));
    if(
isnull(params)) return SendClientMessage(playerid0xFFFFFFF,"Syntax error.Correct usage: /ooc [text]");
    
format(stringsizeof(string), "(( %s: %s ))"sendernameparams);
    
SendClientMessageToAll(0xffcc00FFstring);
    return 
1;

Reply
#2

Yes I think so,maybe you need more cells.Try it by increasing the string[257 or somthing].I think it would work.
Reply
#3

Try make string[128]; 128 is normal for a string.
Reply
#4

[128] is just the maximum lenght for chat outputs. you CAN use larger strings, its just commonly sized [128]...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)