AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   would you like to help me: add this function to this plugin (https://forums.alliedmods.net/showthread.php?t=144307)

sadboy 12-01-2010 22:05

would you like to help me: add this function to this plugin
 
1 Attachment(s)
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

Jacob 12-01-2010 22:17

Re: would you like to help me: add this function to this plugin
 
add:cs_set_user_money(id, 10000, 1)

sadboy 12-01-2010 22:42

Re: would you like to help me: add this function to this plugin
 
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])
}

drekes 12-02-2010 09:56

Re: would you like to help me: add this function to this plugin
 
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);
    }



sadboy 12-03-2010 21:59

Re: would you like to help me: add this function to this plugin
 
1 Attachment(s)
yes, thank you ,drekes
but ... it doesn't work , player not respawn after they die
here is your plugin :

Exolent[jNr] 12-04-2010 00:13

Re: would you like to help me: add this function to this plugin
 
You are not allowed to post .amxx files.

Jacob 12-04-2010 02:13

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

Originally Posted by sadboy (Post 1362492)
yes, thank you ,drekes
but ... it doesn't work , player not respawn after they die
here is your plugin :

required:amxx1.8.1

Exolent[jNr] 12-04-2010 02:32

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

Originally Posted by Jacob (Post 1362606)
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.

sadboy 12-04-2010 02:57

Re: would you like to help me: add this function to this plugin
 
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

Exolent[jNr] 12-04-2010 03:01

Re: would you like to help me: add this function to this plugin
 
Try this: https://forums.alliedmods.net/showpo...9&postcount=16


All times are GMT -4. The time now is 11:24.

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