Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sdktools>
- #include <sdkhooks>
- #pragma newdecls required
- #pragma semicolon 1
- public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
- {
- int iCurrentWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
- if(!IsValidEntity(iCurrentWeapon))
- return Plugin_Continue;
- int iClip = GetEntProp(iCurrentWeapon, Prop_Send, "m_iClip1");
- if(iClip == 5 && buttons & IN_RELOAD)
- {
- buttons &= ~IN_ATTACK2;
- return Plugin_Handled;
- }
- return Plugin_Continue;
- }
- stock bool IsValidClient(int iClient)
- {
- if(iClient < 1 || iClient > MaxClients)
- return false;
- return IsClientInGame(iClient);
- }
- stock bool bIsSurvivor(int client)
- {
- return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2 && !IsClientInKickQueue(client) && IsPlayerAlive(client);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement