Raised This Month: $ Target: $400
 0% 

Spawn location


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-26-2016 , 20:02   Spawn location
Reply With Quote #1

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)
}

Last edited by raizo11; 01-26-2016 at 20:20.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-26-2016 , 20:04   Re: Spawn location
Reply With Quote #2

So, what is your question?
__________________
fysiks is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-26-2016 , 20:11   Re: Spawn location
Reply With Quote #3

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?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-26-2016 at 20:16. Reason: better information
addons_zz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-26-2016 , 20:12   Re: Spawn location
Reply With Quote #4

Quote:
Originally Posted by addons_zz View Post
I think he wants to revive a player at specific location, i.e., given that location origins.
Clearly, but he still asked no question.
__________________

Last edited by fysiks; 01-26-2016 at 20:13.
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-26-2016 , 20:31   Re: Spawn location
Reply With Quote #5

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

Last edited by Bugsy; 01-26-2016 at 20:32.
Bugsy is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-26-2016 , 20:42   Re: Spawn location
Reply With Quote #6

I have respawn server ...I want to get respawn immediately
origin 1 for iVictim origin 2 for iKiller

Last edited by raizo11; 01-26-2016 at 20:45.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-26-2016 , 20:55   Re: Spawn location
Reply With Quote #7

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 } );

__________________

Last edited by Bugsy; 01-26-2016 at 20:57.
Bugsy is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-26-2016 , 21:08   Re: Spawn location
Reply With Quote #8

Thank you
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-26-2016 , 21:38   Re: Spawn location
Reply With Quote #9

I see this is now a request forum.
__________________
fysiks is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-26-2016 , 21:48   Re: Spawn location
Reply With Quote #10

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

Last edited by raizo11; 01-26-2016 at 21:48.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
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 09:31.


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