Shogun

Desync - 1.0

Oct 7th, 2011
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.62 KB | None | 0 0
  1. /*
  2.  *      Desync - 1.0
  3.  *      Scripted by: bw_
  4.  */
  5.  
  6. #include <a_samp>
  7. #include <YSI/y_hooks>
  8.  
  9. Hook:bw_OnPlayerConnect(playerid)
  10. {
  11.     SetPVarInt(playerid, "bw_DesyncPlayer", 0);
  12.     return 1;
  13. }
  14.  
  15. Hook:bw_OnPlayerDisconnect(playerid, reason)
  16. {
  17.     SetPVarInt(playerid, "bw_DesyncPlayer", 0);
  18.     return 1;
  19. }
  20.  
  21. Hook:bw_OnPlayerUpdate(playerid)
  22. {
  23.     if (GetPVarInt(playerid, "bw_DesyncPlayer") != 0)
  24.     {
  25.         return 0;
  26.     }
  27.     return 1;
  28. }
  29.  
  30. stock DesyncPlayer(playerid, desync = true)
  31. {
  32.     if (desync)
  33.     {
  34.         SetPVarInt(playerid, "bw_DesyncPlayer", 1);
  35.     }
  36.     else
  37.     {
  38.         SetPVarInt(playerid, "bw_DesyncPlayer", 0);
  39.     }
  40.     return 1;
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment