Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #include <fakemeta_util>
- #define ForPlayers(%1) for(new %1 = 1; %1 <= 32; %1++)
- #pragma semicolon 1
- new const Float:checkStartTime = 30.0;
- new const checkAdmin = false;
- public plugin_init()
- {
- register_plugin("Respawn_Alert", "1.0", "Toldi");
- register_logevent("roundStart", 2, "1=Round_Start");
- loadConfigFile();
- }
- public plugin_precache()
- {
- loadConfigFile();
- }
- public loadConfigFile()
- {
- new path[128];
- get_configsdir(path, charsmax(path));
- server_cmd("exec %s/Respawn_Alert.cfg", path);
- server_exec();
- }
- public roundStart()
- {
- set_task(checkStartTime, "checkUserRespawn");
- }
- public checkUserRespawn()
- {
- ForPlayers(i)
- {
- if(get_user_team(i) != 1 || !is_user_alive(i) || !checkAdmin && get_user_flags(i) & ADMIN_BAN || cs_get_user_buyzone(i))
- {
- continue;
- }
- fm_set_user_health(i, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement