kill command blocked, how to kill player?
i am writing a plugin for natural-selection and i want to kill specific players. but when i use user_kill(id,0 or 1) or set_user_health(id,0), the player wont be killed immediatly but with a 3 second delay, the same as if i would type kill in console.
any1 know how i can kill without that delay?? |
i think the only person here to know that whould be Cheesy
|
take_damage
Or... Create an entity that does damage on them, wait a second, then remove it |
yar! I know it also. I had the same problem. You need to use takedamage
|
k thx but how do i use it?
i tried this but not working entity_set_float(id, EV_FL_takedamage, damage) ? also tried RadiusDamage(Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier) but do not enething neihter |
oh crap :-\ I could have sworn that they would have added the takedamage native from the NS module back in the day.
crap :( What the hell bail! Get that in there! |
Heh that reminds me, better fix slay for NS. :D
Heres code from ns2amx, pretty straight forward to convert it for the engine module. Code:
|
for me its not straight forward to convert it for the engine module, i replaced (i hope its correct)
createentity() with create_entity() set_keyvalue() with DispatchKeyValue() mdll_touch() with fake_touch() but i dont know what to do with mdll_spawn(entity) and set_pev(entity,pev_classname,make_string(szCl assname)) (maybe entity_set_string() ) |
What you have done is correct.
mdll_spawn is just DispatchSpawn() yes entity_set_string() is what you should use. |
ok i've done this:
Code:
Code:
|
| All times are GMT -4. The time now is 14:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.