What is a loop?
Today i will be showing u all how to use a loop and what it is..
What is a loop?
A loop is a way of doing multiple tasks with out coding statements again and again
for example : NoReload..u would have to write it over and over 576 times to make it work for all weapons
but that would take too long so u loop
The For Loop
The for loop :
U declare a value with any value u want. And if that value is no equal to 576 or a given value, it will increase to that number by 1+ to 576
we will be using noreload as example
Let's say we take our loop out..it wouldn't work because we didn't add any weapons for the noreload to work..so let's take our loop back
So if i is not equal to 576 then it will increase by 1+ to 576. But that wouldn't work because it is a float, so u add i*4 . That will keep repeating and the noreload code over and over again 576 times which is the number of guns
More Examples of the For Loop
i created a program with a loop
if the variable i is not equal to 576 it will increase. Now debug and open this program and press enter.. each time u press enter u adds by 1+ 576 times and then closes
why does it do that? coz the u did i++ and which means add by 1..let's say u did i*4..that would add by 4 , 576 times and stop
I hope u guys understand this tut
it now PM me and i'll help u
What is a loop?
A loop is a way of doing multiple tasks with out coding statements again and again
for example : NoReload..u would have to write it over and over 576 times to make it work for all weapons
but that would take too long so u loop
The For Loop
The for loop :
Code:
for(int i=0; i<576; i++)
Code:
if(Weapon)
{
for(int i=0; i<576; i++)
{
DWORD wep = *(DWORD*)(Weapon+(i*4));
if(wep)
{
*(float*)(wep + 0x269C) = 50;
}
}
}
Let's say we take our loop out..it wouldn't work because we didn't add any weapons for the noreload to work..so let's take our loop back
Code:
for(int i=0; i<576;
More Examples of the For Loop
i created a program with a loop
Code:
#include <iostream>
using namespace std;
int main()
{
for(int i=0; i<576; i++)
{
cout << i << endl;
system("PAUSE");
}
return 0;
}
if the variable i is not equal to 576 it will increase. Now debug and open this program and press enter.. each time u press enter u adds by 1+ 576 times and then closes
why does it do that? coz the u did i++ and which means add by 1..let's say u did i*4..that would add by 4 , 576 times and stop
I hope u guys understand this tut
it now PM me and i'll help u

![=]](/forum/images/emotions/=].gif)

