Raised This Month: $ Target: $400
 0% 

Simple respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 02-24-2006 , 08:22   Simple respawn
Reply With Quote #1

I want to respawn a player when he/she dies or types /spawn.
I looked at Geesus "Respawn forever", but i didnt understand the "task-id-system". If someone could write up a simple code, or explain the task thing, it would be nice.

Thx.
__________________
Sig(h)!
Obbin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-24-2006 , 08:32  
Reply With Quote #2

Simple.
Code:
#include <amxmodx> #include <cstrike> public plugin_init() {   register_clcmd("say /spawn" , "cmd_spawn"); } public cmd_spawn(id) {   if(!is_user_alive(id)) {     set_task(0.1 , "spawn_user" , id);   }   return PLUGIN_HANDLED; // if you don't want other people to see the /spawn text in chat } public spawn_user(id) {   cs_user_spawn(id); }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 02-24-2006 , 08:47  
Reply With Quote #3

Width cs_user_spawn() there is no need to spawn the player twice to avoid the hl engine bug?
__________________
Sig(h)!
Obbin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-24-2006 , 09:00  
Reply With Quote #4

Well cs_user_spawn is specifically for players and spawn() is not, so I'd say yes ( no need for 2 ).
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-28-2006 , 14:06  
Reply With Quote #5

can you add for this also that the weaponss aren't staying eem i mean when you are killed your weapon disapears...
nordy is offline
cccpsmiley
Senior Member
Join Date: Mar 2006
Location: Los Angeles, CA
Old 05-28-2006 , 15:04  
Reply With Quote #6

any way you can possibly make this work for all mods ? or atleast dod
cccpsmiley is offline
Send a message via AIM to cccpsmiley
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-28-2006 , 15:12  
Reply With Quote #7

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_clcmd("say /spawn" , "cmd_spawn"); } public cmd_spawn(id) {     spawn(id);     set_task(0.5,"second_spawn",id); } public second_spawn(id) {     spawn(id); }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
cccpsmiley
Senior Member
Join Date: Mar 2006
Location: Los Angeles, CA
Old 05-28-2006 , 18:03  
Reply With Quote #8

dont work for dod
cccpsmiley is offline
Send a message via AIM to cccpsmiley
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-28-2006 , 20:28  
Reply With Quote #9

You need to give more time between the spawns.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-28-2006 , 20:49  
Reply With Quote #10

fixed.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 20:24.


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