Raised This Month: $12 Target: $400
 3% 

Function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 11-26-2015 , 08:40   Function
Reply With Quote #1

What is the difference of a function without the public and the public?
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-26-2015 , 18:23   Re: Function
Reply With Quote #2

afaik public function will get hooked by other plugins while the one without public (blank) is just a stock
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 11-26-2015 , 21:42   Re: Function
Reply With Quote #3

Thank you, but I can use the public as stock?
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-26-2015 , 23:23   Re: Function
Reply With Quote #4

Well it depends

one common example would be:
PHP Code:
public Spawn(id// you must use "public" here in this case
{
    if(
is_user_alive(id))
        
kill(id);
}

stock kill(id)
{
    
xxx


Last edited by Chihuahuax; 11-26-2015 at 23:31.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 11-27-2015 , 18:11   Re: Function
Reply With Quote #5

ok thx
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-27-2017 , 08:05   Re: Function
Reply With Quote #6

Cara, eu acho que funções public podem ser acessadas por outros plugins, por exemplo, quando você registra uma native. Stock são funções que, quando são compiladas, não apresentam erros e não são acessadas por outros plugins. Acredito que seja isso.
__________________








CrazY. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-29-2017 , 09:59   Re: Function
Reply With Quote #7

Quote:
Originally Posted by CrazY. View Post
Cara, eu acho que funções public podem ser acessadas por outros plugins, por exemplo, quando você registra uma native. Stock são funções que, quando são compiladas, não apresentam erros e não são acessadas por outros plugins. Acredito que seja isso.
Don't you see the last post was back in 2015? A function without the 'public' prefix is a private function not a stock. You create a stock by adding the 'stock' prefix.
__________________
edon1337 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-29-2017 , 11:14   Re: Function
Reply With Quote #8

What is the problem that the last post was back in 2015? Case you dont have a explication to this question, dont say nothing.
__________________








CrazY. is offline
Kotoamatsukami
Member
Join Date: Jan 2017
Location: Malaysia
Old 03-30-2017 , 06:19   Re: Function
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
Don't you see the last post was back in 2015? A function without the 'public' prefix is a private function not a stock. You create a stock by adding the 'stock' prefix.
Actually, you can bump if you have a question to be asked, explanation that you want to make for others, or when the thread still hasn't receive any solution after a period of two weeks( well, I don't find any further information regarding this rule, ermm, nah, whatever).
  • Do not derail threads or post completely unrelated topics in a thread.
What I see he did wrong is he didn't provide an English text for his explanation.
  • This is an English forum (other than a few specific, labeled subforums). If you're going to post in another language, also add the text in English, even if from online translator.
Kotoamatsukami is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-30-2017 , 07:35   Re: Function
Reply With Quote #10

Quote:
Originally Posted by CrazY. View Post
What is the problem that the last post was back in 2015?
Why do you bother bringing up a 2 year old thread, also writing in other foreign language?

Quote:
Originally Posted by CrazY. View Post
Case you dont have a explication to this question, dont say nothing.
I already gave an explanation, you were calling a private function a stock, stop misinforming people. Also the OP stated that the problem was solved.

Quote:
Originally Posted by Kotoamatsukami View Post
Actually, you can bump if you have a question to be asked, explanation that you want to make for others, or when the thread still hasn't receive any solution after a period of two weeks( well, I don't find any further information regarding this rule, ermm, nah, whatever).
  • Do not derail threads or post completely unrelated topics in a thread.
Are you blind ? He already stated that it was solved, don't try to tell me what is right and what is wrong.
Quote:
Originally Posted by felipemilralze View Post
ok thx
__________________
edon1337 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode