SA-MP Forums Archive
What is the meaning of "Public" ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What is the meaning of "Public" ? (/showthread.php?tid=514041)



What is the meaning of "Public" ? - Le3aT - 19.05.2014

The title describes it, I want the meaning of "public" and the use of it, Why do we use it ?

Ex; public OnGameModeInit()


Re: What is the meaning of "Public" ? - Alex Magaсa - 19.05.2014

A Public function can be called in a timer, needs to be forwarded and mostly returns something;
inside a public function there can be other functions, things to do.


Re: What is the meaning of "Public" ? - Vince - 19.05.2014

Only when it needs to be directly called by the server. Callbacks, timers, CallLocalFunction and CallRemoteFunction. That's it. You don't need public functions for anything else.


Re: What is the meaning of "Public" ? - Rittik - 19.05.2014

Public is a keyword which helps us to make a globalized function which may or may not return a value.


Re: What is the meaning of "Public" ? - Threshold - 19.05.2014

Quote:
Originally Posted by Rittik
Посмотреть сообщение
Public is a keyword which helps us to make a globalized function which may or may not return a value.
Lol, I love how this guy always posts random crap that he doesn't even understand himself in an attempt to make himself look good.

Just a small note, please stop trying to help if you don't know what you're even saying.