Updated docs. Minior fixes.
Started writing docs about volumetric features. Improved manual style, lined up tables. Added missing attributes in anticamp conversion functions. Fixed anticamp not extinguishing players who leave a volume that ignite players.
This commit is contained in:
@ -267,6 +267,29 @@ VolAnticampInit()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a player leave a anticamp volume.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param volumeIndex Index of volume the player left.
|
||||
*/
|
||||
VolAnticampOnPlayerLeave(client, volumeIndex)
|
||||
{
|
||||
new dataindex = Volumes[volumeIndex][Vol_DataIndex];
|
||||
|
||||
switch (AnticampData[dataindex][Anticamp_Action])
|
||||
{
|
||||
case Anticamp_Drug:
|
||||
{
|
||||
// TODO: Un-drug player.
|
||||
}
|
||||
case Anticamp_Ignite:
|
||||
{
|
||||
ExtinguishEntity(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Timer callback for anticamp volumes. Applies actions on players in volumes.
|
||||
*/
|
||||
@ -575,6 +598,10 @@ VolAnticampActionToString(VolAnticampAction:actionType, String:buffer[], maxlen,
|
||||
{
|
||||
return shortName ? strcopy(buffer, maxlen, "damage") : strcopy(buffer, maxlen, "Damage player");
|
||||
}
|
||||
case Anticamp_Slay:
|
||||
{
|
||||
return shortName ? strcopy(buffer, maxlen, "slay") : strcopy(buffer, maxlen, "Kill player");
|
||||
}
|
||||
case Anticamp_Drug:
|
||||
{
|
||||
return shortName ? strcopy(buffer, maxlen, "drug") : strcopy(buffer, maxlen, "Drug player ");
|
||||
@ -610,6 +637,10 @@ stock VolAnticampAction:VolAnticampStringToAction(const String:action[])
|
||||
{
|
||||
return Anticamp_Damage;
|
||||
}
|
||||
else if (StrEqual(action, "slay", false))
|
||||
{
|
||||
return Anticamp_Slay;
|
||||
}
|
||||
else if (StrEqual(action, "drug", false))
|
||||
{
|
||||
return Anticamp_Drug;
|
||||
|
@ -46,7 +46,7 @@ Parameters:
|
||||
|
||||
Example:
|
||||
|
||||
zr_vol_add 0 0 0 100 200 300 anticamp team=humans delay=5 effect=wireframe effect_color=255,0,0
|
||||
zr_vol_add 0 0 0 100 200 300 anticamp team=humans delay=5 amount=100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -74,6 +74,10 @@ VolOnPlayerLeave(client, volumeIndex)
|
||||
new VolumeFeatureTypes:voltype = Volumes[volumeIndex][Vol_Type];
|
||||
switch (voltype)
|
||||
{
|
||||
case VolFeature_Anticamp:
|
||||
{
|
||||
VolAnticampOnPlayerLeave(client, volumeIndex);
|
||||
}
|
||||
case VolFeature_ClassEdit:
|
||||
{
|
||||
VolClassEditOnPlayerLeave(client, volumeIndex);
|
||||
|
Reference in New Issue
Block a user