SA-MP Forums Archive
String - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String (/showthread.php?tid=368266)



String - Roddan - 12.08.2012

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;




Re: String - TaLhA XIV - 12.08.2012

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


Re: String - mrsamp - 12.08.2012

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


Re: String - Babul - 12.08.2012

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