Raised This Month: $ Target: $400
 0% 

respawn after x secs once


Post New Thread Reply   
 
Thread Tools Display Modes
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-23-2007 , 23:27   Re: respawn after x secs once
Reply With Quote #11

register_event("HLTV", "new_round", "a", "1=0", "2=0")
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-23-2007 , 23:50   Re: respawn after x secs once
Reply With Quote #12

Code:
#include <amxmodx> #include <cstrike> #include <fun> #define PLUGIN "Respawn after x secs once" #define VERSION "1.0" #define AUTHOR "kp_uparrow" new g_time; new g_money; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     g_time = register_cvar("sv_worldspawntime","3")     g_money = register_cvar("sv_worldspawnmoney","3000")     register_event("HLTV", "new_round", "a", "1=0", "2=0") } public new_round(){     set_task(get_pcvar_float(g_time),"spawndead") } public spawndead(){     new players[32],num_of_players,num     get_players(players,num_of_players,"bh")     new l_money;     l_money = get_pcvar_num(g_money)     for(new player = 0; player < num_of_players;  player++){         num = players[player]         if (is_user_connected(num)==1){             if (cs_get_user_team(num)==CS_TEAM_T || cs_get_user_team(num)==CS_TEAM_CT){                                 spawn(num)                  set_task(0.1,"spawnagain",num,"",0)                 client_print(num,print_chat,"[NESPH] Dam! not enough spawn points, respawned you with extra %s money",l_money)                 cs_set_user_money(num,cs_get_user_money(num)+l_money)             }         }     }     return PLUGIN_CONTINUE } public spawnagain(num){     spawn(num)     give_item(num,"weapon_knife")     if (get_user_team(num)==1){         give_item(num,"weapon_glock18")         give_item(num,"ammo_9mm")         give_item(num,"ammo_9mm")     }     else{                 give_item(num,"weapon_usp")         give_item(num,"ammo_45acp")         give_item(num,"ammo_45acp")     } }

now?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-24-2007 , 00:16   Re: respawn after x secs once
Reply With Quote #13

actually you don't need fun module, you could use cs_user_spawn(), with it you don't need to spawn a player twice and it auto give a team specific weapon and knife, if you wanna give user ammo, you could use cs_set_user_bpammo.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Trent-Resnor
Member
Join Date: Jan 2007
Location: Ontario, Canada
Old 01-24-2007 , 00:19   Re: respawn after x secs once
Reply With Quote #14

Quote:
Originally Posted by jim_yang View Post
actually you don't need fun module, you could use cs_user_spawn(), with it you don't need to spawn a player twice and it auto give a team specific weapon and knife, if you wanna give user ammo, you could use cs_set_user_bpammo.
he got ya good.
__________________
Trent-Resnor is offline
Send a message via MSN to Trent-Resnor
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-24-2007 , 00:59   Re: respawn after x secs once
Reply With Quote #15

i know the cs spawn is experimental

cs_set_user_bpammo ( index, weapon, amount )

what does in weapon, the CAPS or the smallones, amount?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-24-2007 , 13:16   Re: respawn after x secs for worldspawn kill maps
Reply With Quote #16

Quote:
Originally Posted by Emp` View Post
I'm going to hurt the next person to include amxmisc unnecessarily...
This is a stupid comment, especially for a plugin approver.
amxmisc is full of stocks, stocks won't get included if not used.
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-24-2007 , 20:47   Re: respawn after x secs once
Reply With Quote #17

there is a problem

this spawns people without HUD and the money pcvar does not work
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-25-2007 , 12:42   Re: respawn after x secs once
Reply With Quote #18

Quote:
Originally Posted by kp_uparrow View Post
there is a problem

this spawns people without HUD and the money pcvar does not work
There are a few ways I can think of to solve this:

1) Delay the second "spawn" call by 0.3 seconds instead of 0.1
2) Don't call the second spawn, just give them the items after 0.1 seconds
3) Use cs_user_spawn instead (and only call it once)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-25-2007 , 15:26   Re: respawn after x secs once
Reply With Quote #19

ok i changed the seconds spawn time to 0.3 seconds

i changed the %s to %i
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-25-2007 , 15:45   Re: respawn after x secs once
Reply With Quote #20

Quote:
Originally Posted by kp_uparrow View Post
ok i changed the seconds spawn time to 0.3 seconds

i changed the %s to %i
Well can you at least test it? I'm not sure if any of those will fix it. If I were going to bet on any, it would be cs_user_spawn.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 03:35.


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