AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Making people respawn one place after they die.. (https://forums.alliedmods.net/showthread.php?t=25143)

TiToTal 03-08-2006 17:14

Making people respawn one place after they die..
 
I believe it is simples, I just want to, when someone DIES, this person spawn in one place... when this person enters in the server, he spawns normally, but everytime he dies he spawns somewhere { 0,0,0 }

Can you tell me how I can do this? thanks...

Kensai 03-08-2006 17:15

what

Define "one place"??

TiToTal 03-08-2006 18:09

Quote:

Originally Posted by Kensai
what

Define "one place"??

one point... { 0 , 0 , 0 }

Des12 03-08-2006 18:25

Code:
new teleorigin[3] = { 0, 0, 0}; // ... register_event("ResetHUD","Event_ResetHUD","be"); // ... public Event_ResetHUD(id) {     if(!is_user_alive(id))     {         return PLUGIN_HANDLED;     }     set_user_origin(id, teleorigin);                     return PLUGIN_HANDLED; }

TiToTal 03-08-2006 19:53

Quote:

Originally Posted by Des12
Code:
new teleorigin[3] = { 0, 0, 0}; // ... register_event("ResetHUD","Event_ResetHUD","be"); // ... public Event_ResetHUD(id) {     if(!is_user_alive(id))     {         return PLUGIN_HANDLED;     }     set_user_origin(id, teleorigin);                     return PLUGIN_HANDLED; }

but does this code act only when the person dies? I mean, when the person connects to the server, is not alive... =/

Twilight Suzuka 03-08-2006 19:58

No, and people can execut fullupdate to get to resethud, thus hacking your plugin.

TiToTal 03-08-2006 20:00

Quote:

Originally Posted by Twilight Suzuka
No, and people can execut fullupdate to get to resethud, thus hacking your plugin.

what does resethud do?

GHW_Chronic 03-08-2006 20:05

resethud is a HL engine event that whenever someone spawns, or any other occation of hving their hud reset, it is executed. fullupdate resets your hud. (if you'll notice, fullupdate in console will cause your money to flashgreen.

PS. should hook deathmessage if I'm reading your request right.

TiToTal 03-08-2006 22:31

Quote:

Originally Posted by GHW_Chronic
resethud is a HL engine event that whenever someone spawns, or any other occation of hving their hud reset, it is executed. fullupdate resets your hud. (if you'll notice, fullupdate in console will cause your money to flashgreen.

PS. should hook deathmessage if I'm reading your request right.

yeah... I guess so... I will try it tomorrow... now I just want to go to the bed 8)

Des12 03-09-2006 16:50

But if you hook DeathMsg, the person will be dead for at least a few seconds, therefore making him not spawn. How about TsMsg or something I saw...


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

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