Few more for organization :D
This commit is contained in:
parent
99476979ad
commit
55a7885835
|
@ -414,17 +414,6 @@ stock bool:AntiStickIsModelBoxColliding(client1, client2)
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the collision group on a client.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param collisiongroup Collision group flag.
|
||||
*/
|
||||
AntiStickSetCollisionGroup(client, collisiongroup)
|
||||
{
|
||||
SetEntProp(client, Prop_Data, "m_CollisionGroup", collisiongroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the collision group on a client.
|
||||
*
|
||||
|
@ -436,6 +425,17 @@ AntiStickGetCollisionGroup(client)
|
|||
return GetEntProp(client, Prop_Data, "m_CollisionGroup");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the collision group on a client.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param collisiongroup Collision group flag.
|
||||
*/
|
||||
AntiStickSetCollisionGroup(client, collisiongroup)
|
||||
{
|
||||
SetEntProp(client, Prop_Data, "m_CollisionGroup", collisiongroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a collision group value into a name.
|
||||
*
|
||||
|
|
|
@ -36,6 +36,22 @@ CookiesInit()
|
|||
ZHPOnCookiesCreate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a cookie value as a bool.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param cookie The handle to the cookie.
|
||||
*/
|
||||
bool:CookiesGetClientCookieBool(client, Handle:cookie)
|
||||
{
|
||||
// Get cookie string.
|
||||
decl String:cookievalue[8];
|
||||
GetClientCookie(client, cookie, cookievalue, sizeof(cookievalue));
|
||||
|
||||
// Return string casted into an int, then to bool.
|
||||
return bool:StringToInt(cookievalue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts a bools for setting client cookies.
|
||||
*
|
||||
|
@ -54,19 +70,18 @@ CookiesSetClientCookieBool(client, Handle:cookie, bool:cookievalue)
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a cookie value as a bool.
|
||||
* Gets a integer value from a cookie.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param cookie The handle to the cookie.
|
||||
*/
|
||||
bool:CookiesGetClientCookieBool(client, Handle:cookie)
|
||||
CookiesGetInt(client, Handle:cookie)
|
||||
{
|
||||
// Get cookie string.
|
||||
decl String:cookievalue[8];
|
||||
GetClientCookie(client, cookie, cookievalue, sizeof(cookievalue));
|
||||
decl String:strValue[16];
|
||||
strValue[0] = 0;
|
||||
GetClientCookie(client, cookie, strValue, sizeof(strValue));
|
||||
|
||||
// Return string casted into an int, then to bool.
|
||||
return bool:StringToInt(cookievalue);
|
||||
return StringToInt(strValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,18 +100,3 @@ CookiesSetInt(client, Handle:cookie, value)
|
|||
// Set string value.
|
||||
SetClientCookie(client, cookie, strValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a integer value from a cookie.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param cookie The handle to the cookie.
|
||||
*/
|
||||
CookiesGetInt(client, Handle:cookie)
|
||||
{
|
||||
decl String:strValue[16];
|
||||
strValue[0] = 0;
|
||||
GetClientCookie(client, cookie, strValue, sizeof(strValue));
|
||||
|
||||
return StringToInt(strValue);
|
||||
}
|
||||
|
|
|
@ -228,6 +228,18 @@ OverlaysChannel:OverlaysClientFindChannel(client)
|
|||
return OVERLAYS_CHANNEL_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current value of a channel state of a client.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param channel The channel to get state of.
|
||||
*/
|
||||
bool:OverlaysClientGetChannelState(client, OverlaysChannel:channel)
|
||||
{
|
||||
// Return current value.
|
||||
return g_bOverlayChannel[client][channel];
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle or set new value to a channel state of a client.
|
||||
*
|
||||
|
@ -259,18 +271,6 @@ bool:OverlaysClientSetChannelState(client, OverlaysChannel:channel, bool:update
|
|||
return g_bOverlayChannel[client][channel];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current value of a channel state of a client.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param channel The channel to get state of.
|
||||
*/
|
||||
bool:OverlaysClientGetChannelState(client, OverlaysChannel:channel)
|
||||
{
|
||||
// Return current value.
|
||||
return g_bOverlayChannel[client][channel];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set overlay path for a channel.
|
||||
*
|
||||
|
|
|
@ -71,10 +71,10 @@ stock ToolsGetClientVelocity(client, Float:vecVelocity[3])
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets client's velocity.
|
||||
* Sets client's velocity.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param vecVelocity Array to store vector in.
|
||||
* @param vecVelocity Velocity to set on client.
|
||||
*/
|
||||
stock ToolsSetClientVelocity(client, const Float:vecVelocity[3])
|
||||
{
|
||||
|
|
|
@ -116,6 +116,21 @@ WeaponAmmoOnOffsetsFound()
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get clip/reserve ammo on a weapon.
|
||||
*
|
||||
* @param weapon The weapon index.
|
||||
* @param clip True gets clip ammo, false gets reserve.
|
||||
*/
|
||||
stock WeaponAmmoGetAmmo(weapon, bool:clip)
|
||||
{
|
||||
// Set variable to offset we are changing.
|
||||
new ammooffset = clip ? g_iToolsClip1 : g_iToolsClip2;
|
||||
|
||||
// Return ammo offset value.
|
||||
return GetEntData(weapon, ammooffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set clip/reserve ammo on a weapon.
|
||||
*
|
||||
|
@ -143,18 +158,14 @@ stock WeaponAmmoSetAmmo(weapon, bool:clip, value, bool:add = false)
|
|||
}
|
||||
|
||||
/**
|
||||
* Get clip/reserve ammo on a weapon.
|
||||
* Get the count of any grenade-type a client has.
|
||||
*
|
||||
* @param weapon The weapon index.
|
||||
* @param clip True gets clip ammo, false gets reserve.
|
||||
* @param client The client index.
|
||||
* @param slot The type of
|
||||
*/
|
||||
stock WeaponAmmoGetAmmo(weapon, bool:clip)
|
||||
stock WeaponAmmoGetGrenadeCount(client, WeaponAmmoGrenadeType:type)
|
||||
{
|
||||
// Set variable to offset we are changing.
|
||||
new ammooffset = clip ? g_iToolsClip1 : g_iToolsClip2;
|
||||
|
||||
// Return ammo offset value.
|
||||
return GetEntData(weapon, ammooffset);
|
||||
return GetEntData(client, g_iToolsAmmo + (_:type * 4));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -179,17 +190,6 @@ stock WeaponAmmoSetGrenadeCount(client, WeaponAmmoGrenadeType:type, value, bool:
|
|||
SetEntData(client, g_iToolsAmmo + (_:type * 4), ammovalue + value, _, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of any grenade-type a client has.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param slot The type of
|
||||
*/
|
||||
stock WeaponAmmoGetGrenadeCount(client, WeaponAmmoGrenadeType:type)
|
||||
{
|
||||
return GetEntData(client, g_iToolsAmmo + (_:type * 4));
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a weapon entity and returns an entry in enum WeaponAmmoGrenadeType.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user