2021-07-25, 01:24 AM
I have 2 questions:
1 - How to create a command with only strings, example: /test text1 text2?
2 - How to prevent the strings from exceeding the size, for example, the str1 array has the size of 5 chars and I type /test testing(8 chars)?
1 - How to create a command with only strings, example: /test text1 text2?
2 - How to prevent the strings from exceeding the size, for example, the str1 array has the size of 5 chars and I type /test testing(8 chars)?
PHP Code:
CMD:test(playerid,params[])
{
new str1[5],str2[5];
if(sscanf(params, "s[5]s[5]",str1,str2))
{
SendClientMessage(playerid,-1,"Error");
return 1;
}
return 1;
}