What is the point of using 'forward'
#4

Forwarding helps you to make a new "public" in your script.
Example:

pawn Код:
forward SendClientMessageToAllAdmins(msg[]);
public SendClientMessageToAllAdmins(msg[])
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerAdmin(i))
        {
            SendClientMessage(i,COLOR_YELLOW,msg);
        }
    }
}
Now you can use this function in your script just like the way you are using SendClientMessage or SendClientMessageToAll
Reply


Messages In This Thread
What is the point of using 'forward' - by K9IsGodly - 12.03.2014, 20:53
Re: What is the point of using 'forward' - by radyx - 12.03.2014, 21:05
Re: What is the point of using 'forward' - by dannyk0ed - 12.03.2014, 21:09
Re: What is the point of using 'forward' - by AnonScripter - 12.03.2014, 21:10
Re: What is the point of using 'forward' - by CuervO - 12.03.2014, 21:11

Forum Jump:


Users browsing this thread: 2 Guest(s)