Respawn plugin edit
Well...let me expalin the scripting. I have a plugin that when you type /respawn it will respawn you. But I want to make this different. I want when the player dies to show him a message for example "You have X more seconds to press any key or you will be moved to spectators." and then if the user press any key (A, W, S, D, mouse click, any key from the keyboard) will respawn him, otherwise he will be moved to spectators.
This is the plugin: Code:
/* AMXX Mod script. |
Re: Respawn plugin edit
In public on_Death replace spawn_func with client_print(id, print_chat, "You have X more seconds to press any key or you will be moved to spectators.") and also add function "move_to_spectator" that will move him to spectators and call it via set_task (in public on_Death). Then, hook cmd_start with fakemeta, and if player team is not spectacor and not unassigned, then respawn him and remove "move_to_spectator" task.
|
Re: Respawn plugin edit
You didn't understood what I want....well let me explain more. The player dies, but remains in his team with the status DEAD. At this moment it will appear a hud message that says 'If you don't press any key in X seconds you will be moved to spectators.' For example, the seconds are 20. If in 20 seconds he don't press any button, then he will be moved to spectators.
|
Re: Respawn plugin edit
Trafikkz
It's actually you who didn't understand what I said. Read my post once again. If you want hudmessage, use set/show_hudmessage instead of client_print. |
Re: Respawn plugin edit
Yep, Sonic's method describes is how I would do it also.
|
Re: Respawn plugin edit
Thanks, I have read as 'Then, hook cmd_start and if is spectator or the team is unassigned he will get respawn' so I said wtf? Thanks, the topic can be closed.
|
Re: Respawn plugin edit
Sorry for double post but I'm stuck. Look at what I've done, but it doesn't work. The server freezes when I press a button.
Code:
/* AMXX Mod script. |
Re: Respawn plugin edit
Try this:
PHP Code:
|
Re: Respawn plugin edit
It doesn't work....I don't press any key and I get respawn.
|
Re: Respawn plugin edit
If you hook FCanPlayerRespawn with orpheu and you return true, then player is respawned like 1.5 second after death, unless he's pressing a button.
If he is pressing a button he is put in spec mode. Would this fit your needs ? (would be more efficient) |
| All times are GMT -4. The time now is 04:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.