• 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] sscanf
#9
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)?



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; }
  Reply


Messages In This Thread
sscanf - by Y_Less - 2019-04-21, 11:34 PM
RE: sscanf - by L0K3D - 2019-04-22, 06:59 AM
RE: sscanf - by javelin - 2019-04-22, 11:46 AM
RE: sscanf - by Toretto - 2019-04-25, 07:53 AM
RE: sscanf - by L0K3D - 2019-04-25, 02:56 PM
RE: sscanf - by Cyrus - 2019-04-27, 09:12 PM
RE: sscanf - by Gravityfalls - 2019-05-01, 03:26 PM
RE: sscanf - by Sasino97 - 2019-06-21, 06:06 AM
RE: sscanf - by JR_Junior - 2021-07-25, 01:24 AM