Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //> [FS] Spawn Protection - By HotStyle <//
- #include <a_samp>
- #define PROTECTION 30 // Edit here the 'seconds' if you want
- forward AntiSpawnkill(playerid);
- public OnFilterScriptInit()
- {
- print("\n__________________________________________");
- print(" Spawn Protection - loaded ");
- print(" By: HotStyle ");
- print("__________________________________________\n");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerHealth(playerid, 10000.0);
- new str[128];
- format(str, sizeof(str), "You can't be killed for %d second(s) - Spawn Protection", PROTECTION);
- SendClientMessage(playerid, 0xFF0000AA, str);
- SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 5000);
- SetTimerEx("AntiSpawnkill",PROTECTION*1000,0,"d",playerid);
- return 1;
- }
- public AntiSpawnkill(playerid)
- {
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, 0xFF0000AA, "Spawn Protection Over - Move if you're unprotected");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement