Raised This Month: $ Target: $400
 0% 

Stock doesn't kill a players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-16-2015 , 14:11   Stock doesn't kill a players
Reply With Quote #1

I have my own stock

PHP Code:
stock UserKill(idinflictor 0killer 0weapon 0body 0shouldgib 0damagebits 0bool:addDeath false) {
if(!
userAlive(id) || !userConnected(killer)) return;

new 
iDeaths;
if(!
addDeathiDeaths get_pdata_int(id444);
set_pdata_int(id75body);
set_pdata_int(id76damagebits);
set_pdata_int(id1071);
set_pev(idpev_dmg_inflictorinflictor inflictor killer killer id);
set_msg_block(83BLOCK_ONCE);
ExecuteHamB(Ham_Killedidkiller killer idshouldgib);
if(!
addDeathset_pdata_int(id444iDeaths);

if(
userAlive(id)) return;

new 
effect pev(idpev_effects);
if(
effect 128set_pev(idpev_effectseffect 128);

new 
lenname[32];
if(
get_weaponname(weaponname31)) {
if(~
1<<4|1<<6|1<<9|1<<25 1<<weaponlen 7;
else 
name "grenade";
}
else 
name weapon == "tracktrain" "world";

emessage_begin(MSG_ALL83);
ewrite_byte(killer killer id);
ewrite_byte(id);
ewrite_byte(body == 0);
ewrite_string(name[len]);
emessage_end();

when I use it in the following way (suicide):

PHP Code:
public SomeFunction(id) {
UserKill(id);

doesn't kill a player

Last edited by Arkshine; 05-17-2015 at 09:42.
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode