Author Topic: how to make samp maps  (Read 798 times)

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: how to make samp maps
« Reply #15 on: April 29, 2013, 10:39:26 am »
Can you give a tutorial on how to make loops? :c
Why do you need to loop here? Anyway, this is how a loop goes on SA-MP scripting:
Code: [Select]
for(new a = 0; a< 3; a++)
{
 print(a);
}
In this loop, it loops around 3 times as 'a' is < 3. And then prints the output of a. As it's rounding 3 times, and 'a' gets increased on loop (a++ = increasing) it comes under values '1, 2 and 3'
Output:
1
2
3

For object coding also loops can be useful.