Advertisement
HotStyle

Untitled

Jul 28th, 2012
1,163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.08 KB | None | 0 0
  1.            //>          [FS] Spawn Protection - By HotStyle           <//
  2.  
  3.  
  4.  
  5. #include <a_samp>
  6.  
  7. #define PROTECTION 30 // Edit here the 'seconds' if you want
  8.  
  9. forward AntiSpawnkill(playerid);
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n__________________________________________");
  13.     print("         Spawn Protection - loaded          ");
  14.     print("          By: HotStyle                      ");
  15.     print("__________________________________________\n");
  16.     return 1;
  17. }
  18.  
  19. public OnPlayerSpawn(playerid)
  20. {
  21.     SetPlayerHealth(playerid, 10000.0);
  22.     new str[128];
  23.     format(str, sizeof(str), "You can't be killed for %d second(s) - Spawn Protection", PROTECTION);
  24.     SendClientMessage(playerid, 0xFF0000AA, str);
  25.     SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 5000);
  26.     SetTimerEx("AntiSpawnkill",PROTECTION*1000,0,"d",playerid);
  27.     return 1;
  28. }
  29.  
  30. public AntiSpawnkill(playerid)
  31. {
  32.     SetPlayerHealth(playerid, 100.0);
  33.     SendClientMessage(playerid, 0xFF0000AA, "Spawn Protection Over - Move if you're unprotected");
  34.     return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement