I'm new in includes
#8

Quote:
Originally Posted by EliranPesahov
View Post
Let me explain to you like that.
Credits for SA-MP Wiki.

Native:
"A native function is one defined in the virtual machine (i.e. the thing which runs the script), not in the script itself.
You can only define native functions if they're coded into SA:MP or a plugin, however you can create fake natives.
Because the native functions from .inc files are detected by pawno and listed in the box on the right hand side of pawno.
it can be useful to use native to get your own custom functions listed there."


Example:
pawn Code:
native FunctionName(playerid, const string[]);
Native is simply needed when you create a specific function/stock.

Lets say I have created a simple function that tells your ID.
I will have to forward it also.
Example:
pawn Code:
forward ShowID(playerid);
public ShowID(playerid)
{
    new string[14];
    format(string, sizeof(string), "Your ID: %d!",playerid)
    SendClientMessageToAll(0xFFFFFFAA, string);
    return 1;
}
Now, if you don't use a native for that function. so on the right side you won't see ShowID example.
Like, GivePlayerMoney, GetPlayerMoney and etc.

If you make a new include and type inside:
pawn Code:
native ShowID(playerid);
When you open the pawno program, it will automatically show it.
NICE SOLUTION MAN, I've been trying to add my methods to the right bar just as you said and been looking around for the soultion. Big Help A+

Edited: Worked perfectly thank you XP
Reply


Messages In This Thread
I'm new in includes - by Libra_PL - 15.01.2011, 10:34
Re: I'm new in includes - by TheKingOfSamp - 15.01.2011, 10:52
Re: I'm new in includes - by Toreno - 15.01.2011, 11:01
Re: I'm new in includes - by Libra_PL - 15.01.2011, 11:02
Re: I'm new in includes - by alpha500delta - 15.01.2011, 11:23
Re: I'm new in includes - by Libra_PL - 15.01.2011, 11:33
Re: I'm new in includes - by Toreno - 15.01.2011, 12:02
Re: I'm new in includes - by BeEasy114 - 10.05.2011, 18:08

Forum Jump:


Users browsing this thread: 2 Guest(s)