Witam.
Prosiłbym o przerobienie vipa, a właściwie dodanie kilku funkcji.
Zawiera on:
-podwójny skok
-dodatkowe 100Hp
-wszystkie granaty
-30% szybszy
a oto SMA:
#include <amxmodx> #include <cstrike> #include <fakemeta> #include <fun> #include <hamsandwich> new bool:g_FreezeTime, bool:g_Vip[33], skoki[33]; public plugin_init(){ register_plugin("VIP Ultimate", "6.1.0.2", "benio101 & speedkill"); RegisterHam(Ham_Item_PreFrame, "player", "fw_Player_ResetMaxSpeed", 1); register_logevent("logevent_round_start", 2, "1=Round_Start"); register_event("HLTV", "event_new_round", "a", "1=0", "2=0"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_forward(FM_CmdStart, "CmdStartPre"); } public client_authorized(id){ if(get_user_flags(id) & read_flags("t")){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; } public fw_Player_ResetMaxSpeed(id){ if(g_Vip[id]){ if(is_user_alive(id)){ fw_Player_ResetMaxSpeedVip(id); } } } public logevent_round_start(){ g_FreezeTime=false; } public event_new_round(){ g_FreezeTime=true; } public fw_Player_ResetMaxSpeedVip(id){ if(!g_FreezeTime){ set_user_maxspeed(id,get_user_maxspeed(id)*1.3); } } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public CmdStartPre(id, uc_handle){ if(g_Vip[id]){ if(is_user_alive(id)){ CmdStartPreVip(id, uc_handle); } } } public CmdStartPreVip(id, uc_handle){ new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){ --skoki[id]; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id,pev_velocity,velocity); } else if(flags & FL_ONGROUND && skoki[id]!=-1){ skoki[id] = 1; } } public SpawnedEventPreVip(id){ skoki[id]=1; set_user_health(id, get_user_health(id)+100); give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); cs_set_user_bpammo(id, CSW_FLASHBANG,2); give_item(id, "weapon_smokegrenade"); }
a chciałbym, żeby ten vip dodatkowo posiadał:
-status VIP w tabeli punktów,
-powitanie, gdy VIP wchodzi na serwer,
-unikalny model dostępny tylko dla VIP'a [inny dla TT, inny dla CT]
-po wpisaniu w say /vip będzie dostępna informacja co posiada i gdzie go zakupić [chodzi o to vip.txt]
-po wpisaniu w say /vips będą widoczne VIP'y online
-aby posiadał tylko 1 smoke'a, zamiast wszystkich granatów i ten smoke był kolorowy.
Z góry dziękuję, myślę, że znajdzie się ktoś, kto to dla mnie wykona.
P.S. Jeżeli którychś rzeczy nie potraficie wykonać, to możecie je śmiało pominąć
Pozdrawiam.
Edited by akbo0, 15.12.2013 20:22.