Raised This Month: $ Target: $400
 0% 

[CSS|CS:GO] Buy respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Plugin ID:
3668
Plugin Version:
1.0.3
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allows players to buy respawn to play again
    Old 05-29-2013 , 21:40   [CSS|CS:GO] Buy respawn
    Reply With Quote #1

    Buy Respawn


    .:: Functionality ::.

    Allows players to buy respawn to return to play again, it is possible to set the price.

    This plugin has been rewritten from the original made ​​by member: Devzirom
    Original thread: http://forums.alliedmods.net/showthread.php?t=141345

    The cause of rewriting the plugin? It has not been approved.

    I removed the cvar sm_buy_relive_buytime, because hardly anyone will die before the end buytime, however I am open to suggestions will.

    .:: CVARs ::.
    • sm_buyrespawn_enabled = 1/0 - plugin is enabled/disabled (def. 1)
    • sm_buyrespawn_cost = 0-16000 - Set the price for the respawn (def. 5000)
    • sm_buyrespawn_per_round = 0-99 - Set the max respawns per round (def. 10)
    • sm_buyrespawn_message = 1/0 plugin message is enabled/disabled (def. 1)
    • sm_buyrespawn_version - current plugin version
    .:: Commands ::.
    • !buyr
    • !respawn
    • !revive
    • !buyrespawn
    • !buyrevive
    .:: Changelog ::.
    Spoiler


    OFICIAL WORK WITH GAMES
    • Counter-Strike Source
    • Counter-Strike Global Offensive

    .:: Credits ::.

    Devzirom

    Thanks and please comment !
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_buy_respawn.sp - 1604 views - 6.2 KB)
    __________________
    My Plugins | VIEW HERE | I accept private requests, send me a PM.
    Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
    Meet the Medic | Disguise Expert | Crazy Jet

    CZSBrasil TEAM

    Last edited by rodrigo286; 01-01-2014 at 08:25. Reason: Removed attachment. .smx not needed since there is a "get plugin" function
    rodrigo286 is offline
    CtrlC Developer
    New Member
    Join Date: May 2013
    Old 05-30-2013 , 11:53   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #2

    I am using on my server, and is really stable, liked it, thanks for the plugin, Rodrigo286.
    CtrlC Developer is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-31-2013 , 02:19   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #3

    Removed attached .smx as it is not needed.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-31-2013 , 02:53   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #4

    Hi,

    Just to tell you that you need FCVAR_NOTIFY to your version ConVar, or otherwise it will be useless since your plugin will not be trackable. You could also add that to the "public convar" thing in this thread's post; that way when approved people knows how many time it is used.

    Also, you should not use FCVAR_REPLICATED as it can produce errors on the client.

    Finally, you should use the prefix "sm_" in all your "commands_respawn" array's strings. This prevent possible conflict in case Valve decide to implement such a console variable. Don't worry, using "sm_command" will still add the "/command" and "!command" chat triggers.

    Note that 2nd and 3rd points are not obligatory, but strongly recommended.

    Red
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    The End Is Near...
    Member
    Join Date: Dec 2012
    Location: Siberia
    Old 05-31-2013 , 03:55   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #5

    1.
    PHP Code:
    // Bad
    for (new 0sizeof(commands_respawn); i++)

    // Good
    new size sizeof(commands_respawn);
    for (new 
    0sizei++) 
    2.
    PHP Code:
    // Bad
    new team GetClientTeam(client);
    if(
    team != CS_TEAM_CT && team != CS_TEAM_T)

    // Good
    if (GetClientTeam(client) > 1
    3. Get cvars (gBuyRespawnEnabled) two times - Bad

    4.
    PHP Code:
    // Doubt
    if(!IsValidClient(client)) and if(client 1
    The End Is Near... is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-31-2013 , 04:31   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #6

    Quote:
    Originally Posted by The End Is Near... View Post
    1.
    PHP Code:
    // Bad
    for (new 0sizeof(commands_respawn); i++)

    // Good
    new size sizeof(commands_respawn);
    for (new 
    0sizei++) 
    2.
    PHP Code:
    // Bad
    new team GetClientTeam(client);
    if(
    team != CS_TEAM_CT && team != CS_TEAM_T)

    // Good
    if (GetClientTeam(client) > 1
    3. Get cvars (gBuyRespawnEnabled) two times - Bad

    4.
    PHP Code:
    // Doubt
    if(!IsValidClient(client)) and if(client 1
    1- Small optimization; it is run only once (not that important); but you're right.

    2- "<="; not ">"

    3- Convars are already cached in SM itself. Caching in a plugin does probably optimize a bit further, but that's far from being important.

    4- Look at his function; it is already checking if "< 1" or not.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 05-31-2013 at 04:32.
    RedSword is offline
    The End Is Near...
    Member
    Join Date: Dec 2012
    Location: Siberia
    Old 05-31-2013 , 06:37   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #7

    1. < 1 two times actually
    2. <= confused
    thinking about
    PHP Code:
    if (GetClientTeam(client) > 1)
    {
         
    // Code

    The End Is Near... is offline
    rodrigo286
    Veteran Member
    Join Date: Sep 2010
    Location: Brazil, São Paulo
    Old 05-31-2013 , 14:12   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #8

    Quote:
    Originally Posted by The End Is Near... View Post
    1. < 1 two times actually
    2. <= confused
    thinking about
    PHP Code:
    if (GetClientTeam(client) > 1)
    {
         
    // Code


    If team 2 or 3 No
    If team 1 Yes

    <= Less or equal

    Plugin Updated in initial post
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_buy_respawn.sp - 827 views - 2.9 KB)
    __________________
    My Plugins | VIEW HERE | I accept private requests, send me a PM.
    Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
    Meet the Medic | Disguise Expert | Crazy Jet

    CZSBrasil TEAM

    Last edited by rodrigo286; 06-01-2013 at 21:48.
    rodrigo286 is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-31-2013 , 15:14   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #9

    Looks ok. Approved.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    homerjsimpson
    BANNED
    Join Date: Feb 2009
    Location: https://t.me/pump_upp
    Old 05-31-2013 , 21:03   Re: [CSS] Buy respawn, a re-write of Buy revive
    Reply With Quote #10

    Awesome ... great rewritten
    homerjsimpson is offline
    Send a message via ICQ to homerjsimpson Send a message via AIM to homerjsimpson Send a message via Yahoo to homerjsimpson Send a message via Skype™ to homerjsimpson
    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 03:43.


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