Posts: 534
Threads: 265
Joined: Jul 2014
Hi,
Can i use function like use stock, i mean
Код:
CMD:blbla( ... )
{
HELLO( playerid );
}
forward HELLO ( playerid );
public HELLO( playerid )
{
SendClientMessage(playerid,-1,"HELLO");
}
I can do this?
Posts: 983
Threads: 98
Joined: Feb 2012
Reputation:
0
Yes, but for this situations use stocks.
Publics are usually used in general for timers and calling them (remote) you better use stocks in this case.
Hint: return 1; at the end of the cmd
Posts: 534
Threads: 265
Joined: Jul 2014
Hm,
Nice problem if i use stock (now i always use stock) but now in one dialog, my pawn crash, when i turn to public ok..
Posts: 161
Threads: 2
Joined: Jul 2014
Reputation:
0
If you're planning on making a library, you should go for stock.
otherwise
"public" saves the name of the function in the amx (normally
functions are just called be address, the human-readable
name is not important). Saving the name means that the
function can be found by name later on. When you specify a
function in "SetTimer", "SetTimerEx", "CallLocalFunction" or
"CallRemoteFunction" you specify it by name so these can
only call public functions. Callbacks such as
"OnPlayerConnect" are also public for the same reason. - ******
Posts: 161
Threads: 2
Joined: Jul 2014
Reputation:
0
sorry for bad spelling. It's stock.