/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "Rozgrzewka He"
#define VERSION "1.0"
#define AUTHOR "lisek"
new bool:knife = false
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","func_death","a")
register_event("CurWeapon","switchweapon","be","1=1")
register_event("TextMsg", "restart_round", "a", "2&#Game_will_restart_in")
set_task(65.0, "koniec",0)
set_task (5.0,"start",0)
}
public start()
{
server_cmd("sv_restart 3")
knife=true
}
public restart_round()
{
if(knife == true){
server_cmd("mp_freezetime 0")
client_cmd(0,"mp3 stop")
client_cmd(0,"mp3 play sound/misc/twoj.mp3")
}
}
public koniec()
{
knife = false
client_cmd(0, "stopsound")
server_cmd("sv_restart 5")
set_hudmessage(0, 255, 0, 0.37, 0.30, 0, 6.0, 12.0)
show_hudmessage(0, "Restart za 5s...")
}
public func_death()
{
new ofiara=read_data(2)
set_task(1.0, "respawn",ofiara)
}
public respawn(id) spawn(id)
public switchweapon(id)
{
if(knife==true && is_user_alive(id))
{
new ammo, clip, weapon = get_user_weapon(id, ammo, clip)
if(weapon == CSW_GLOCK18)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
}
else if(weapon == CSW_USP)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
}
else if(weapon == CSW_KNIFE)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
}
else if(weapon == CSW_C4)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
}
}
}
public plugin_precache()
precache_sound("misc/twoj.mp3")Beda plusy


Dodatki SourceMod












