Raised This Month: $51 Target: $400
 12% 

Plugin that drops a ball when a player is killed until a new round starts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fantas
Junior Member
Join Date: Mar 2023
Old 04-01-2023 , 17:05   Plugin that drops a ball when a player is killed until a new round starts
Reply With Quote #1

I see on some Russian Multi 1vs1 servers a plugin that drops a ball when you kill someone until the round starts again, in order to entertain the players.
what is this plugin? thanks

Last edited by Fantas; 04-03-2023 at 16:59. Reason: language correction
Fantas is offline
Fantas
Junior Member
Join Date: Mar 2023
Old 04-03-2023 , 16:39   Re: Plugin that drops a ball untile new round start
Reply With Quote #2

Someone?
Fantas is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 04-03-2023 , 17:23   Re: Plugin that drops a ball when a player is killed until a new round starts
Reply With Quote #3

PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegisterEvent("player_death""OnPlayerDeath"EventHookMode_Post);
}

public 
Action OnPlayerDeath(Handle event, const char[] namebool dontBroadcast)
{
    
int victim GetEventInt(event"userid");
    
int attacker GetEventInt(event"attacker");

    if (
attacker == 0)
    {
        
// Player died from environmental damage (falling, drowning, etc.)
        
return Plugin_Handled;
    }

    
int victimEntIndex GetEventInt(event"entindex_killed");
    
Vector victimPos GetClientEyePosition(victim);

    
// Drop a ball at the victim's location
    
CreateEntityByName("prop_physics_multiplayer");
    
DispatchKeyValue("model""models/props_borealis/bluebarrel001.mdl");
    
DispatchKeyValue("angles""0 0 0");
    
DispatchKeyValue("origin""%f %f %f"victimPos.xvictimPos.yvictimPos.z);
    
DispatchKeyValue("fademindist""100000");
    
DispatchKeyValue("fademaxdist""100000");
    
DispatchKeyValue("health""1");
    
DispatchKeyValue("explodedamage""0");
    
DispatchKeyValue("explodedamageforce""0");
    
DispatchKeyValue("exploderadius""0");
    
DispatchKeyValue("spawnflags""4");
    
DispatchKeyValue("vscripts""scripts/vscripts/ball.lua");
    
DispatchKeyValue("targetname""ball");
    
DispatchSpawn("prop_physics_multiplayer");

    return 
Plugin_Handled;

__________________
vortex. is offline
Fantas
Junior Member
Join Date: Mar 2023
Old 04-03-2023 , 19:27   Re: Plugin that drops a ball when a player is killed until a new round starts
Reply With Quote #4

thanks but when i go compile, gives-me this errors

/groups/sourcemod/upload_tmp/textNo2vLM.sp(5) : error 017: undefined symbol "RegisterEvent"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(20) : error 139: could not find type "Vector"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(23) : error 017: undefined symbol "CreateEntityByName"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(24) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(25) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(26) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(27) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(2 : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(29) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(30) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(31) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(32) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(33) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(34) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(35) : error 017: undefined symbol "DispatchKeyValue"
/groups/sourcemod/upload_tmp/textNo2vLM.sp(36) : error 017: undefined symbol "DispatchSpawn"

16 Errors.
Fantas is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 04-03-2023 , 20:56   Re: Plugin that drops a ball when a player is killed until a new round starts
Reply With Quote #5

cause u need to use sdktools

add "#include <sdktools>" in top of the script

and this is wont give ur the desired thing, this is like a snippet
__________________

Last edited by alasfourom; 04-03-2023 at 20:57.
alasfourom is offline
Fantas
Junior Member
Join Date: Mar 2023
Old 04-05-2023 , 10:15   Re: Plugin that drops a ball when a player is killed until a new round starts
Reply With Quote #6

thanks, but i donīt know how to program something..
Justo compile hehe
Fantas is offline
Reply



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:43.


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