Strona główna | Użytkownicy | Grupy | Szukaj | Rejestracja |
 
| Rejestracja

Serwer War3 cs Warcraft 3 mod 80.72.41.210:27228 [S/NS] steam
Serwer Diablomod Diablomod 194.149.88.242:27017 [S/NS] steam
Serwer FFA FFA 193.33.177.14:27231 [S/NS] steam
Serwer Pokemod Pokemod 91.210.130.90:27004 [S/NS] steam
Serwer Minecraft Minecraft mc.volta-sq.pl:32403 1.2.4
Serwer Teamspeak 3 TeamSpeak ts.volta-sq.pl 3.0

Poradniki HLDS Poradniki dotyczące konfiguracji serwera HLDS (Counter-Strike), modów oraz maszyny. Z nami skonfigurujesz go tak, że każdy gracz będzie z niego zadowolony!

Odpowiedz

Odsłon tematu: 627  
Stare 17-10-10, 08:51   #1

 
siwka12
 
Wiek: 20
Posty: 37


Pasek przeładowania

Pokazuje się pasek przeładowania broni podczas reload'u:

Cytat:
#include
#include

new bool:reload[33] = false
new specwho[33]

public plugin_init() {

register_plugin("Reloadbar","1.00","NL)Ramon(NL")
register_cvar("amx_reloadbar","1")
register_event("CurWeapon", "stopreload", "be")
register_event("StatusValue", "show_status", "bd", "1=2")
register_event("ResetHUD", "notspecing", "b")
}

public notspecing(id)
specwho[id] = 0

public stopreload(id)
{
message_begin(MSG_ONE_UNRELIABLE,108,{0,0,0},id)
write_short(0)
message_end()
reload[id] = false
showspecreload(id,0)
}

public client_PreThink(id)
{

if(get_cvar_num("amx_reloadbar") == 0)
return PLUGIN_CONTINUE
if (!is_user_connected(id))
return PLUGIN_CONTINUE
if(get_user_button(id) & IN_RELOAD && reload[id] == false)
{
msg(id)
reload[id] = true
}
return PLUGIN_CONTINUE
}



public show_status(id)
{
specwho[id] = read_data(2)
}

public showspecreload(id,timetoshow)
{
new players = get_maxplayers()
new i
for (i = 0 ; i < players ; i++)
{
if(specwho[i] == id)
{
message_begin(MSG_ONE,108,{0,0,0},id)
write_short(timetoshow)
message_end()
}
}
}

public canreload(id)
reload[id] = false

public msg(id)
{
new ammo
new clip
new weapon = get_user_weapon(id,clip,ammo)
message_begin(MSG_ONE,108,{0,0,0},id)
if(ammo != 0)
{
switch(weapon){
case 1:
{
if(clip != 13)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}

}
case 3:
{
if(clip != 10)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 7:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 8:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 10:
{
if(clip != 30)
{
write_short(5)
message_end()
set_task(5.0,"canreload",id)
showspecreload(id,5)
return PLUGIN_HANDLED
}
}
case 11:
{
if(clip != 20)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 12:
{
if(clip != 25)
{
write_short(4)
message_end()
set_task(4.0,"canreload",id)
showspecreload(id,4)
return PLUGIN_HANDLED
}
}
case 13:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 14:
{
if(clip != 35)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 15:
{
if(clip != 25)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 16:
{
if(clip != 12)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 17:
{
if(clip != 20)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 18:
{
if(clip != 10)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 19:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 20:
{
if(clip != 100)
{
write_short(5)
message_end()
set_task(5.0,"canreload",id)
showspecreload(id,5)
return PLUGIN_HANDLED
}
}
case 22:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 23:
{
if(clip != 30)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 24:
{
if(clip != 20)
{
write_short(4)
message_end()
set_task(4.0,"canreload",id)
showspecreload(id,4)
return PLUGIN_HANDLED
}
}
case 26:
{
if(clip != 7)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 27:
{
if(clip != 30)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
case 28:
{
if(clip != 30)
{
write_short(2)
message_end()
set_task(2.0,"canreload",id)
showspecreload(id,2)
return PLUGIN_HANDLED
}
}
case 30:
{
if(clip != 50)
{
write_short(3)
message_end()
set_task(3.0,"canreload",id)
showspecreload(id,3)
return PLUGIN_HANDLED
}
}
}
}
write_short(0)
message_end()
reload[id] = false
return PLUGIN_CONTINUE
}
  Cytuj

Odpowiedz

Tagi
przeladowania, pasek




Ostatnio wyszukiwane
battlefield 3 multiplayer na piracie counter strike 1.6 download non steam counter strike 1.6 non steam counter strike 1.6 non steam download counter strike 1.6 non steam pobierz cs 1.6 download non steam cs 1.6 download non steam v32 cs 1.6 non steam cs 1.6 non steam download cs 1.6 non steam download v32 cs 1.6 non steam pobierz cs download non steam cs non steam download cs non steam pobierz diablo mod download cs 1.6 non steam ffa forum cs mapy cs mapy do cs mapy do cs 1.6 phoenix download phoenix program pobierz cs 1.6 non steam polskie serwery cs prototype spolszczenie ronaldo messi tapety na telefon 240x320 ujarani volta sq katalog Waciaki reklama na telebimach WizytĂłwki Babia GĂłra mostview