15.12.2010, 02:11
In my personal theory, stock is just like a function. It's a bunch of functions inside other function, like..
You can also add extra parameters like..
But i yet dont know how to do that.
pawn Код:
OnPlayerConnect(playerid)
{
WelcomePlayer();
}
stock WelcomePlayer();
{
new string[50], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(COLOR_YELLOW, string);
}
pawn Код:
WelcomePlayer(color);