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

[CS:GO] Ball with nets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 05-19-2018 , 09:08   [CS:GO] Ball with nets
Reply With Quote #1

https://forums.alliedmods.net/showthread.php?t=283311

Can this plugin be edited so that I can add football nets?
__________________
PinHeaDi is offline
boomix
Senior Member
Join Date: May 2015
Location: Latvia
Old 05-19-2018 , 11:51   Re: [CS:GO] Ball with nets
Reply With Quote #2

Here is something that he wants:



That one is possible by editing dev zones. Dont have anymore the source file of it, but it was like checking on every tick if the ball entity is in the box.
__________________

Last edited by boomix; 05-19-2018 at 11:51.
boomix is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 05-19-2018 , 12:21   Re: [CS:GO] Ball with nets
Reply With Quote #3

I'm familiar with dev zone, that was my first idea, but I couldn't figure that up.
__________________
PinHeaDi is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 05-19-2018 , 13:21   Re: [CS:GO] Ball with nets
Reply With Quote #4

Quote:
Originally Posted by PinHeaDi View Post
I'm familiar with dev zone, that was my first idea, but I couldn't figure that up.
add me on steam and i can help out http://steamcommunity.com/id/codingcow
CowGod is offline
Send a message via Skype™ to CowGod
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-19-2018 , 19:43   Re: [CS:GO] Ball with nets
Reply With Quote #5

why don't you create the zone and hook touch?
__________________

Last edited by 8guawong; 05-19-2018 at 19:43.
8guawong is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 05-20-2018 , 13:03   Re: [CS:GO] Ball with nets
Reply With Quote #6

Quote:
Originally Posted by 8guawong View Post
why don't you create the zone and hook touch?

How can I do that? Create a zone and hook touch, that will detect the ball entity. How can I detect any devzone on touch? That's the tough part.
__________________

Last edited by PinHeaDi; 05-20-2018 at 13:09.
PinHeaDi is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 05-21-2018 , 00:29   Re: [CS:GO] Ball with nets
Reply With Quote #7

Quote:
Originally Posted by PinHeaDi View Post
How can I do that? Create a zone and hook touch, that will detect the ball entity. How can I detect any devzone on touch? That's the tough part.
I have already made such feature with my own version of the ball plugin.
This is a snippet from the code, i'm too lazy to separate the whole thing from the core code.

PHP Code:
SDKHook(gI_BallSDKHook_TouchOnBallTouch); // Somewhere in the code

public void OnBallTouch(int ballint entity)
{
    if (
IsValidEntity(ball))
    {
        
float fBallPos[3];
        
GetEntPropVector(ballProp_Send"m_vecOrigin"fBallPos);
        
fBallPos[2] += 5.0;

        if (
IsInsideZone(vPointsfBallPos)) 
        {
            
// It's inside!
            
RespawnBall();
        }
    }
}

bool IsInsideZone(float point[8][MAXZONELIMIT][3], float playerPos[3]) // Credits: shavit's bhop timer
{    
    
int iStatus 0;
    
    for (
int i 03i++)
    {
        if (
point[0][0][i] >= playerPos[i] == point[7][0][i] >= playerPos[i])
            continue;
        else
            ++
iStatus;
    }

    if (
iStatus == 3)
        return 
true;
    return 
false;

__________________
LenHard is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 05-21-2018 , 05:38   Re: [CS:GO] Ball with nets
Reply With Quote #8

I'm very thankful for that snippet, i really am, however:
PHP Code:
// D:\Sourcemod Plugins\jailbreak_football.sp(235) : error 017: undefined symbol "vPoints"
// D:\Sourcemod Plugins\jailbreak_football.sp(243) : error 017: undefined symbol "MAXZONELIMIT" 
Also, since I don't see it work with Dev Zones, but instead with something thats in the core plugin which say which i a net and which is not.
__________________

Last edited by PinHeaDi; 05-21-2018 at 05:39.
PinHeaDi is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 05-22-2018 , 19:13   Re: [CS:GO] Ball with nets
Reply With Quote #9

@lenhard can u sent whole plugin?
Zyten is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 05-24-2018 , 01:25   Re: [CS:GO] Ball with nets
Reply With Quote #10

Quote:
Originally Posted by PinHeaDi View Post
I'm very thankful for that snippet, i really am, however:
PHP Code:
// D:\Sourcemod Plugins\jailbreak_football.sp(235) : error 017: undefined symbol "vPoints"
// D:\Sourcemod Plugins\jailbreak_football.sp(243) : error 017: undefined symbol "MAXZONELIMIT" 
Also, since I don't see it work with Dev Zones, but instead with something thats in the core plugin which say which i a net and which is not.
vPoints is the zone's points.

Quote:
Originally Posted by Zyten View Post
@lenhard can u sent whole plugin?
It's private
__________________

Last edited by LenHard; 05-24-2018 at 01:26.
LenHard is offline
Reply


Thread Tools
Display Modes

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 04:40.


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