Can you tell me what the 1 in the substring is used for and what the 6 and 7 are used for?
substring is used in every program language, baseically cat a part from string
example:
String = "Player 12"
//if u write out this then result: Player 12
String = Substring(String,2,4)
//if u write out this then result: P
layer 12
so Substring(YourString,CutStart,CutEnd)
CutStart=character position in string, u start cut from here
//example "P" = 1, "l" = 2, "a" =3, "y" =4,"e"=5,"r"=6, " " = 7, "1" = 8, "2" = 9th character in string
CutEnd =that character position when ur cutting is over
Edit:Nevermind,but can you confirm what I believe it is? 1=red(player 1) 6 is to make sure it is -give 1 (enter chat string greater than or equal to 6)
7 is to clean up the chat string? lol idk, :/
acctually from 7 character is the info
so if your command is "-give 8"
then
string="-give 8"
SubString(string.1.1)="-"
SubString(string.2.2)="g"
SubString(string.3.3)="i"
SubString(string.4.4)="v"
SubString(string.5.5)="e"
SubString(string.6.6)=" "
SubString(string.7.7)="8"
so i convert the 7th string character to integer and "8" is 8, its mean Player(8)
i made condition because if u typed only "-give " what is 6 character long then the trigger dont running, coz simnple senseless, dont ahve any info because player number will be 7th character