AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   teleport all players? (https://forums.alliedmods.net/showthread.php?t=215621)

image. 05-10-2013 10:20

teleport all players?
 
anyone know how to teleport all alive players to theirs respawns ?

didoWEE 05-10-2013 10:53

Re: teleport all players?
 
get the origins where they are spawned and teleport them to these origins when you want

Xalus 05-10-2013 11:16

Re: teleport all players?
 
PHP Code:

stock respawn_all()
{
    new 
intPlayersarrayPlayers[32]
    
get_players(arrayPlayersintPlayers"a")
    
    for(new 
0intPlayersi++)
    {
        
ExecuteHamB(Ham_CS_RoundRespawnarrayPlayers[i])
    }



didoWEE 05-10-2013 11:50

Re: teleport all players?
 
Won't the weapons disappear?

hleV 05-10-2013 11:54

Re: teleport all players?
 
Weapons shouldn't disappear, but it will restore players' health to full. Should be something like this:
PHP Code:

    for(new 0playerhealthintPlayersi++)
    {
        
player arrayPlayers[i];
        
health get_user_health(player);
        
ExecuteHamB(Ham_CS_RoundRespawnplayer)
        
set_user_health(player);
    } 


image. 05-13-2013 11:16

Re: teleport all players?
 
thanks, now I need this function but...with only teleport alive ct to spawn and 'freeze' ct for 8 seconds...

jimaway 05-14-2013 14:08

Re: teleport all players?
 
check for player team in the for loop, add FL_FROZEN flag to the player and create a task to remove the frozen


All times are GMT -4. The time now is 10:49.

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