Freeze time
Posted: 2013 Feb 05 17:17
Sveiki, noriu padaryti taip kad pvz po 40 sekundžių visi T gautu freeze ir jiems neitų naudoti jokių šviesų (F)
Gal galite duoti tokį koduką?
Gal galite duoti tokį koduką?
Code: Select all
set_task(40.0, "OnTerroristFreeze");
Code: Select all
public OnTerroristFreeze(){ new players[32], playerCount; get_players(players, playerCount, "aceh", "TERRORIST"); if (!playerCount) return; for (new i; i < playerCount; i++) set_entity_flags(players[i], FL_FROZEN, true);}
Code: Select all
#include <amxmodx>#include <engine> public plugin_init() { set_task(40.0, "OnTerroristFreeze");} public OnTerroristFreeze(){ new players[32], playerCount; get_players(players, playerCount, "aceh", "TERRORIST"); if (!playerCount) return; for (new i; i < playerCount; i++) set_entity_flags(players[i], FL_FROZEN, true);}
Giltinas wrote:Code: Select all
#include <amxmodx>#include <engine> public plugin_init() { set_task(40.0, "OnTerroristFreeze");} public OnTerroristFreeze(){ new players[32], playerCount; get_players(players, playerCount, "aceh", "TERRORIST"); if (!playerCount) return; for (new i; i < playerCount; i++) set_entity_flags(players[i], FL_FROZEN, true);}
iskviecia tam tikra funkcija nurodytu laiku, siuo atveju po 40 sekundziu OnTerroristFreeze funkcija bus iskviesta..faqub wrote:Gal gali paaiškinti kur šitą kodą dėti?
set_task(40.0, "OnTerroristFreeze");
Nes nelabai suprantu.