Member
|
04-26-2024
, 07:31
Re: Speedmeter +AmmoPacks
|
#3
|
Quote:
Originally Posted by bigdaddy424
keeping this logic the player will get 1 ammo pack every FREQ seconds, in this case thats 0.1 or 10 ammo packs per second
you have 2 options. either give player 1 ammo pack every few seconds if they keep a constant speed of 1800+ or give player 1 ammo pack once they reach 1800 and in order to get another one, speed has to drop down around 1100 so its safe to assume that theyre not abusing or benefiting from the small lump where hitting 1799 and 1800 again will get you another ammo pack...
|
Thank you. those ideas are good but..
i did this actually before and it work but sometimes the player will not get any aps bcs if they strafe with +500 fps the speed will increase and jump EX: from 1795 to 1810 in 0.1 second so he will not get any aps + there is another problem some maps got ramp pucher that puch you with +1900 speed so there is no chance getting AmmoPacks
PHP Code:
SpeedTask(id) { static get new name[32] get_user_name(id, name, 31) static i, target static Float:velocity[3] static Float:speed, Float:speedh for(i=1; i<=maxplayers; i++) { if(!is_user_connected(i)) continue if(!plrSpeed[i]) continue target = pev(i, pev_iuser1) == 4 ? pev(i, pev_iuser2) : i pev(target, pev_velocity, velocity)
speed = vector_length(velocity) speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0)) static r, g, b if(speedh >= 1805) { r = 255 g = 20 b = 20 set_hudmessage(r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0) ShowSyncHudMsg(i, SyncHud, "%3.2f units/second^n%3.2f velocity^n^nWow! You Hit 1800 Speed!!!!", speed, speedh) } else if(speedh >= 1800) { r = 255 g = 20 b = 20 zp_set_user_ammo_packs(i, zp_get_user_ammo_packs(i) + get_pcvar_num(zp_ammo_packs_get)) ColorChat(i, TEAM_COLOR, "^4[ZP] ^1You Got^3 %i ^4Ammo Packs", get_pcvar_num(zp_ammo_packs_get)) set_hudmessage(r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0) ShowSyncHudMsg(i, SyncHud, "%3.2f units/second^n%3.2f velocity^n^nWow! You Hit 1800 Speed!!!!", speed, speedh)
} else if(speedh >= 1000) { r = 255 g = 215 b = 0 set_hudmessage(r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0) ShowSyncHudMsg(i, SyncHud, "%3.2f units/second^n%3.2f velocity^n^nYou Hit 1000 Speed", speed, speedh) } else if(speedh >= 500) { r = 20 g = 255 b = 20 set_hudmessage(r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0) ShowSyncHudMsg(i, SyncHud, "%3.2f units/second^n%3.2f velocity^n^nYou Hit 500 Speed", speed, speedh) } else { r = 255 g = 255 b = 255 set_hudmessage(r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0) ShowSyncHudMsg(i, SyncHud, "%3.2f units/second^n%3.2f velocity", speed, speedh) } } }
i have question, is it possible to make ammopacks duration? i mean if the player hit +1800 speed he will get 1 aps every 10 seconds
Last edited by Hn.S Xmix; 04-26-2024 at 07:33.
|
|