public chowanyspr(id)
{
if(g_Szukacz == 1)
{
client_print(0, print_chat, "[JailMenu] Chowany jest juz wlaczony!");
return PLUGIN_HANDLED;
}
g_Szukacz = 1
force_open()
Odliczanie[id] = 30
if(task_exists(id + 3431))
{
remove_task( id + 3431)
}
set_task( 1.0, "Koniec", id + 3431, _, _, "b" )
set_hudmessage(0, 255, 0, 0.0, 0.5, 1, 6.0, 2.0)
show_hudmessage(0, "Chowany zostal wlaczony^n Wiezniowie maja 30 sec na schowanie sie!")
new players[32], pnum
get_players(players, pnum)
for( new i; i<pnum;i++ )
{
g_tempidb = players[i];
}
if(cs_get_user_team(g_tempidb) == CS_TEAM_CT && is_user_alive(g_tempidb))
{
strip_user_weapons(g_tempidb);
give_item(g_tempidb, "weapon_knife");
set_user_maxspeed(g_tempidb, 0.1);
}
set_task(30.0, "chowanyinit")
}
public chowanyinit()
{
new players[32], pnum
get_players(players, pnum)
set_lights("a")
for( new i; i<pnum;i++ )
{
g_tempida = players[i];
if(cs_get_user_team(g_tempida) == CS_TEAM_CT && is_user_alive(g_tempida))
{
switch(random_num(1, 10))
{
case 1:
{
give_item(g_tempida, "weapon_scout")
}
case 2:
{
give_item(g_tempida, "weapon_tmp")
}
case 3:
{
give_item(g_tempida, "weapon_m3")
}
case 4:
{
give_item(g_tempida, "weapon_glock18")
}
case 5:
{
give_item(g_tempida, "weapon_p228")
}
case 6:
{
give_item(g_tempida, "weapon_m4a1")
}
case 7:
{
give_item(g_tempida, "weapon_p90")
}
case 8:
{
give_item(g_tempida, "weapon_mp5navy")
}
case 9:
{
give_item(g_tempida, "weapon_shield")
give_item(g_tempida, "weapon_deagle")
}
case 10:
{
give_item(g_tempida, "weapon_g3sg1")
}
}
}
}
}
public Koniec(task_id)
{
new id = task_id - 3431
set_hudmessage( 80, 0, 255, -1.0, -1.0, 2, 0.02, 1.0, 0.01 )
show_hudmessage( 0, "Za %d klawisze zaczna szukac!", Odliczanie[id] )
Odliczanie[id] -= 1
if(Odliczanie[id] <= 0)
{
if( task_exists(task_id) )
{
remove_task( task_id )
}
set_hudmessage(22, 226, 161, -1.0, -1.0, 1, 6.0, 3.0)
show_hudmessage(0, "Klawisze zostali wypuszczeni!^nWiezniowie strzezcie sie!")
}
}