Raised This Month: $32 Target: $400
 8% 

[ANY] Respawn Ball


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Had3s99
Member
Join Date: Sep 2015
Location: France
Plugin ID:
6605
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 06-15-2019 , 20:50   [ANY] Respawn Ball
    Reply With Quote #1

    Hello,

    My plugin serves to respawn the ball when there is a goal on the map Ba_Jail_Electric_Razor_V6 or Ba_Jail_Electric_Razor_Go.

    U need only upload the plugin and put the map. This plugin work for CSS or CSGO.
    Attached Files
    File Type: sp Get Plugin or Get Source (Respawn Ball.sp - 189 views - 1.9 KB)
    File Type: smx Respawn Ball.smx (13.4 KB, 158 views)
    Had3s99 is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-02-2019 , 20:05   Re: [ANY] Respawn Ball
    Reply With Quote #2

    Great idea, but I have a question, if the map already gives the respawn of the ball when to make goals, this plugin generates some conflict if he puts it in these maps?
    paulo_crash is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 07-02-2019 , 22:51   Re: [ANY] Respawn Ball
    Reply With Quote #3

    Please fix the performance issues before people start adding this to their server..
    A few things I saw:
    1. You don't need to store the Timer and kill it at MapEnd, just the the map flag on the timer it will remove the timer on map end automatically.
    2. Do you really need to include morecolors? You don't even use it.
    3. Do you really need to PrintToServer if the map doesn't match? I'd assume server owners would like to have this plugin plus play other maps, and it provides no useful information.
    4. Why do you create Middle_Stadium variable if you never change it.
    5. Why do you loop through 2048 entities every 0.1 seconds, retrieving their targetname for each one.. (First off you can start from MaxClients since you're looking for a specific entity and players are probably not it.)
    5a. Store the Entity Reference on round start, and use that instead of looping and checking the target name for 2048 entities.
    6. CageFoot1 & CageFoot2 are pretty similar, but not only that they both store and call for the entities position, you can either merge or send in the position to the function.
    6a. Just replace these two with 2 static variables and one function.
    7. You can probably get away with not including smlib, so it can compile on the forum. You only use one function from it.

    EDIT: Didn't test it but maybe this will work?
    Attached Files
    File Type: sp Get Plugin or Get Source (RespawnBall.sp - 380 views - 2.1 KB)

    Last edited by Mitchell; 07-02-2019 at 23:03.
    Mitchell is offline
    delachambre
    AlliedModders Donor
    Join Date: Jan 2011
    Location: France
    Old 07-03-2019 , 12:58   Re: [ANY] Respawn Ball
    Reply With Quote #4

    Quote:
    Originally Posted by Mitchell View Post
    Please fix the performance issues before people start adding this to their server..
    A few things I saw:
    1. You don't need to store the Timer and kill it at MapEnd, just the the map flag on the timer it will remove the timer on map end automatically.
    2. Do you really need to include morecolors? You don't even use it.
    3. Do you really need to PrintToServer if the map doesn't match? I'd assume server owners would like to have this plugin plus play other maps, and it provides no useful information.
    4. Why do you create Middle_Stadium variable if you never change it.
    5. Why do you loop through 2048 entities every 0.1 seconds, retrieving their targetname for each one.. (First off you can start from MaxClients since you're looking for a specific entity and players are probably not it.)
    5a. Store the Entity Reference on round start, and use that instead of looping and checking the target name for 2048 entities.
    6. CageFoot1 & CageFoot2 are pretty similar, but not only that they both store and call for the entities position, you can either merge or send in the position to the function.
    6a. Just replace these two with 2 static variables and one function.
    7. You can probably get away with not including smlib, so it can compile on the forum. You only use one function from it.

    EDIT: Didn't test it but maybe this will work?
    +1
    __________________
    ♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

    Clan-Nemesis
    delachambre 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 19:34.


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