28.08.2012, 02:20
I am looking at Vortex Roleplay 2 as another resource on how to script. I have noticed the author of the script uses "i" a lot. Is this a custom variable or is it built into SAMP? If it is built into SAMP is there reading material on it I can see? Here is a snipit of code from Vortex Roleplay 2:
Код:
stock substr_count(substring[], string[]) { new tmpcount; for( new i = 0; i < strlen(string); i++) { if(strfind(string[i], substring, true)) { tmpcount++; } } return tmpcount; }