Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp> // include samps defines & functions.
- public OnFilterScriptInit() // being called when our script gets loaded!
- {
- new myvar = MyFunction(2); // so now myvar var gots the value returned in MyFunction whic is 2 + 1 = 3
- printf("%d",myvar); // use %d because myvar is integer | will print: 3
- myvar = MyFunction(4); // so now myvar var gots the value returned in MyFunction whic is 4 + 1 = 5
- printf("%d",myvar); // use %d because myvar is integer | will print: 5
- }
- MyFunction(value) // a function we can call it whenever we want
- {
- return ( value + 1 ) ; // so when this functions gets called the value which will return in it will be value + 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement