AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Spawn location (https://forums.alliedmods.net/showthread.php?t=278190)

raizo11 01-26-2016 20:02

Spawn location
 
I want to create a spawn location
Example
How to do this?

iVictim : respawn to : origin 600 -150 -850
iKiller : respawn to : origin 1000 -150 -850

Code:

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
    register_plugin("respawn", "0.1", "x")
   
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
}

public fw_PlayerKilled(iVictim, iKiller) 
{
    if (iVictim == iKiller || !is_user_alive(iKiller))
        return
    ExecuteHamB(Ham_CS_RoundRespawn, iKiller && iVictim)
}


fysiks 01-26-2016 20:04

Re: Spawn location
 
So, what is your question?

addons_zz 01-26-2016 20:11

Re: Spawn location
 
I think he wants to revive a player at specific location, i.e., given that location origins, the dead player pop up there, after he just died. So, the question should be what to change on his code to accomplish that, or what he needs to do/change on his code?

fysiks 01-26-2016 20:12

Re: Spawn location
 
Quote:

Originally Posted by addons_zz (Post 2386899)
I think he wants to revive a player at specific location, i.e., given that location origins.

Clearly, but he still asked no question.

Bugsy 01-26-2016 20:31

Re: Spawn location
 
@raizo11, are the origins you posted the exact ones you want to use? Should they re-spawn immediately, or in the next round (normal)?

raizo11 01-26-2016 20:42

Re: Spawn location
 
I have respawn server ...I want to get respawn immediately
origin 1 for iVictim origin 2 for iKiller

Bugsy 01-26-2016 20:55

Re: Spawn location
 
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

public plugin_init() 
{
    
register_plugin"respawn" "0.1" "x" );
    
    
RegisterHamHam_Killed "player" "fw_PlayerKilled_Post" true );
}

public 
fw_PlayerKilled_PostiVictim iKiller )  
{
    if ( 
iVictim == iKiller || !is_user_aliveiKiller ) ) 
        return;
    
    
ExecuteHamBHam_CS_RoundRespawn iKiller );
    
set_peviKiller pev_origin , { 1000.0 , -150.0 , -850.0 } );
    
    
ExecuteHamBHam_CS_RoundRespawn iVictim );
    
set_peviVictim pev_origin , { 600.0 , -150.0 , -850.0 } );



raizo11 01-26-2016 21:08

Re: Spawn location
 
Thank you

fysiks 01-26-2016 21:38

Re: Spawn location
 
I see this is now a request forum.

raizo11 01-26-2016 21:48

Re: Spawn location
 
Not everyone knows amxx that you, you're American is simple for you..if it was in Russian what were you doing? :shock:


All times are GMT -4. The time now is 09:31.

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