Raised This Month: $ Target: $400
 0% 

would you like to help me: add this function to this plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sadboy
Member
Join Date: Jun 2009
Old 12-01-2010 , 22:05   would you like to help me: add this function to this plugin
Reply With Quote #1

hi i have edited Geesu 's plugin :respawn forever at
http://forums.alliedmods.net/showthread.php?p=8906 for using with bot, i also remove some function which i don't need
to improve performance
but i want people (include bots) when spawn will have enough money to buy (such as 10000) this means when each people spawn,his money will reset to 10000
i have used some plugins such as infinite money at https://forums.alliedmods.net/archiv...p/t-13646.html
or unlimited money http://forums.alliedmods.net/showthread.php?t=3613
but i want to add the function i 've said above to the "respawn forever" plugin which i have edited
please make it best performance as you can
(when a player die , i see the game lag a bit , i think it because when someone respawn ,there are some functions be called,so i edit the less function when respawning as i can)
thank you very much sorry for bad english
this is the plugin i have edited
Attached Files
File Type: sma Get Plugin or Get Source (respawn.sma - 622 views - 958 Bytes)

Last edited by sadboy; 12-01-2010 at 22:21.
sadboy is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 12-01-2010 , 22:17   Re: would you like to help me: add this function to this plugin
Reply With Quote #2

add:cs_set_user_money(id, 10000, 1)
Jacob is offline
sadboy
Member
Join Date: Jun 2009
Old 12-01-2010 , 22:42   Re: would you like to help me: add this function to this plugin
Reply With Quote #3

Thank you very much , this plugin will be this ,right ?
can this plugin be optimized for better performance ?

new const VERSION[] = "1.1"
#include <amxmodx>
#include <fun>
#include <cstrike>
#define DISABLE_CS 0
public plugin_init(){
register_plugin("Respawn Forever", VERSION, "Pimp Daddy (OoTOAoO)")
register_event("DeathMsg","on_Death","a")
register_clcmd("say","on_Chat")
}
public on_Chat(id)
{
new szSaid[32]
read_args(szSaid, 31)
if (equali(szSaid,"^"/respawn^"") || equali(szSaid,"^"respawn^""))
{
spawn_func(id)
}
}
public spawn_func(id)
{
new parm[1]
parm[0]=id
set_task(0.7,"player_spawn",72,parm,1)
set_task(0.9,"player_giveitems",72,parm,1)
cs_set_user_money(id, 10000, 1)
}
public on_Death()
{
new victim_id = read_data(2)
spawn_func( victim_id )
return PLUGIN_CONTINUE
}
public player_giveitems(parm[1])
{
new id = parm[0]
give_item(id, "item_suit")
return PLUGIN_CONTINUE
}
public player_spawn(parm[1])
{
spawn(parm[0])
}

Last edited by sadboy; 12-01-2010 at 23:59.
sadboy is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-02-2010 , 09:56   Re: would you like to help me: add this function to this plugin
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define VERSION "1.0"

new cvar_respawncvar_money;

public 
plugin_init()
{
    
register_plugin("Respawn Forever"VERSION"Drekes");
    
    
RegisterHam(Ham_Killed"player""FwdHamPlayerKilledPost"1);
    
    
cvar_respawn register_cvar("amx_respawn_delay""1.5");
    
cvar_money register_cvar("amx_respawn_money""10000");
}

public 
FwdHamPlayerKillerPost(victimkiller)
{
    if(
is_user_connected(victim))
        
set_task(get_pcvar_float(cvar_respawn), "TaskRespawn"victim);
}

public 
TaskRespawn(id)
{
    if(
is_user_connected(id))
    {
        
cs_set_user_money(idget_pcvar_num(cvar_money));
        
ExecuteHamB(Ham_CS_RoundRespawnid);
    }

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
sadboy
Member
Join Date: Jun 2009
Old 12-03-2010 , 21:59   Re: would you like to help me: add this function to this plugin
Reply With Quote #5

yes, thank you ,drekes
but ... it doesn't work , player not respawn after they die
here is your plugin :
Attached Files
File Type: sma Get Plugin or Get Source (respawn.sma - 566 views - 765 Bytes)

Last edited by Exolent[jNr]; 12-04-2010 at 00:12. Reason: Removed .amxx file
sadboy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-04-2010 , 00:13   Re: would you like to help me: add this function to this plugin
Reply With Quote #6

You are not allowed to post .amxx files.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 12-04-2010 , 02:13   Re: would you like to help me: add this function to this plugin
Reply With Quote #7

Quote:
Originally Posted by sadboy View Post
yes, thank you ,drekes
but ... it doesn't work , player not respawn after they die
here is your plugin :
required:amxx1.8.1
Jacob is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-04-2010 , 02:32   Re: would you like to help me: add this function to this plugin
Reply With Quote #8

Quote:
Originally Posted by Jacob View Post
required:amxx1.8.1
Actually, HamSandwich came out in 1.8.0, but it's always best to run the latest version to be sure it can handle any new and old plugins.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
sadboy
Member
Join Date: Jun 2009
Old 12-04-2010 , 02:57   Re: would you like to help me: add this function to this plugin
Reply With Quote #9

but i am using AMX Mod X 1.8.1.374 have you tried this plugin ?
i enter "amxx plugins" and see the plugin running but nothing happens when they die
sadboy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-04-2010 , 03:01   Re: would you like to help me: add this function to this plugin
Reply With Quote #10

Try this: https://forums.alliedmods.net/showpo...9&postcount=16
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 11:24.


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