AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Buy respawn (https://forums.alliedmods.net/showthread.php?t=225092)

rodrigo286 08-31-2013 17:48

Buy respawn
 
1 Attachment(s)
Buy Respawn


.:: Functionality ::.

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

Converted my plugin for Sourcemod:

https://forums.alliedmods.net/showthread.php?p=1960942

.:: CVARs ::.
  • amxx_buyrespawn_enabled = 1/0 - plugin is enabled/disabled (def. 1)
  • amxx_buyrespawn_cost = 0-16000 - Set the price for the respawn (def. 500)
  • amxx_buyrespawn_per_round = 0-99 - Set the max respawns per round (def. 2)
  • amxx_buyrespawn_message = 1/0 plugin message is enabled/disabled (def. 1)
  • amxx_buyrespawn_version - current plugin version
.:: Commands ::.
  • !respawn
  • /respawn
.:: Changelog ::.
Spoiler


OFICIAL WORK WITH GAMES
  • Counter-Strike 1.6
  • Counter-Strike Condition Zero

.:: Credits ::.

Rodrigo286

I'm take little bit of code of one plugin made by Geesu.

Thanks and please comment ! :bee:

Blizzard_87 08-31-2013 20:12

Re: Buy respawn
 
Why not save there current weapons on death and restore them on re spawning?

wickedd 08-31-2013 20:45

Re: Buy respawn
 
PHP Code:

public LogEvent_RoundStart()
{
/*
    Loop get all players of server
*/
    
new players[32], pnum;
    
get_players(playerspnum);
    for(new 
0pnumi++)
    {
/*
    Set respawn uses to 0
*/
        
respawns[players[i]] = 0;
    }


You don't need a loop, just use arrayset(array, 0, sizeof(array))

PHP Code:

public client_disconnect(client)
{
/*
    Reset respawn uses on player disconnect
*/
    
respawns[client] = 0;


You can remove it, since you set it zero on connect.

PHP Code:

public player_spawn(parm[1])
{
/*
    Spawn player
*/
    
spawn(parm[0])


Use Ham to spawn players.

rodrigo286 08-31-2013 21:28

Re: Buy respawn
 
Quote:

Originally Posted by wickedd (Post 2025849)
PHP Code:

public LogEvent_RoundStart()
{
/*
    Loop get all players of server
*/
    
new players[32], pnum;
    
get_players(playerspnum);
    for(new 
0pnumi++)
    {
/*
    Set respawn uses to 0
*/
        
respawns[players[i]] = 0;
    }


You don't need a loop, just use arrayset(array, 0, sizeof(array))

PHP Code:

public client_disconnect(client)
{
/*
    Reset respawn uses on player disconnect
*/
    
respawns[client] = 0;


You can remove it, since you set it zero on connect.

PHP Code:

public player_spawn(parm[1])
{
/*
    Spawn player
*/
    
spawn(parm[0])


Use Ham to spawn players.

Thanks for this tips, i updated the plugin on initial post. :bacon!:

Regards. :bee:

BLacking98 09-01-2013 09:46

Re: Buy respawn
 
GJ ^^

HalfLife 09-02-2013 05:11

Re: Buy respawn
 
This plugin is nice. Should get approved :)

hornet 09-02-2013 05:18

Re: Buy respawn
 
Tell me what you think will happen if I try and respawn as a spectator ;)

Kia 09-02-2013 05:36

Re: Buy respawn
 
You will respawn as spectator. http://media.tumblr.com/tumblr_l5o5x0n97C1qcrwkh.png

BLacking98 09-02-2013 07:40

Re: Buy respawn
 
Quote:

Originally Posted by Kia (Post 2026817)

AWWWWWW how did you resize my smiley ;D

rodrigo286 09-02-2013 08:09

Re: Buy respawn
 
Now the plugin checks if the player is spectator, to prevent bugs.

Thanks for help. :fox:


All times are GMT -4. The time now is 19:50.

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