Quote:
Originally Posted by jievylook
How can I do so that when the player captures the flag, he has a higher speed than the rest?
|
The API is there.
PHP Code:
/*
These are parsed in the iEvent var of the jctf_flag() forward.
*/
enum
{
/* Event | Forward variables used by event | Description of event */
FLAG_STOLEN = 0, /* iPlayer, iFlagTeam | iPlayer got iFlagTeam's flag from their base */
FLAG_PICKED, /* iPlayer, iFlagTeam | iPlayer picked iFlagTeam's flag from the ground */
FLAG_DROPPED, /* iPlayer, iFlagTeam | iPlayer dropped the iFlagTeam's flag by dying, disconnecting or manually */
FLAG_MANUALDROP, /* iPlayer, iFlagTeam | iPlayer dropped the iFlagTeam's flag manually (using /dropflag) */
FLAG_RETURNED, /* iPlayer, iFlagTeam, bAssist | iPlayer (bAssist ? "assisted on returning" : "returned") the iFlagTeam's flag */
FLAG_CAPTURED, /* iPlayer, iFlagTeam, bAssist | iPlayer (bAssist ? "assisted on capturing" : "captured") the iFlagTeam's flag */
FLAG_AUTORETURN, /* iFlagTeam | iFlagTeam's flag was automatically returned */
FLAG_ADMINRETURN /* iPlayer, iFlagTeam | iFlagTeam's flag was returned by admin iPlayer using the command */
};
/**
* This forward triggers when a team's flag changes status.
* This forward also triggers, for example, when a flag is captured, for the
* capturing player and also for the assisting ones, each having bAssist true/false acordingly.
*
* @param iEvent The event triggered (list above)
* @param iPlayer Index of player
* @param iFlagTeam The flag's team
* @param bool:bAssist Is true if the iPlayer is an assisting player for iEvent, false if not.
* @noreturn
*/
forward jctf_flag(iEvent, iPlayer, iFlagTeam, bool:bAssist);
__________________