FlacoBey

Untitled

Jan 4th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdkhooks>
  3. #include <sdktools>
  4.  
  5. public OnClientPutInServer(client)
  6. {
  7.     SDKHook(client, SDKHook_PreThink, PreThink);  
  8. }
  9.  
  10. public OnClientDisconnect(client)
  11. {
  12.     SDKUnhook(client, SDKHook_PreThink, PreThink);
  13. }
  14.  
  15. public PreThink(client)  
  16. {
  17.     if(bIsSurvivor(client))
  18.     {
  19.         SetEntPropFloat(client, Prop_Send, "m_TimeForceExternalView", 5000.3);
  20.     }
  21. }
  22.  
  23. stock bool bIsSurvivor(int client)
  24. {
  25.     return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2 && !IsClientInKickQueue(client) && IsPlayerAlive(client);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment