Raised This Month: $ Target: $400
 0% 

8 survivors in the rescue vehicle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-11-2022 , 07:10   Re: 8 survivors in the rescue vehicle
Reply With Quote #29

Quote:
Originally Posted by sorallll View Post
Currently I use this and it works fine

PHP Code:
HookEvent("finale_vehicle_leaving"Event_FinaleVehicleLeaving);

void Event_FinaleVehicleLeaving(Event event, const char[] namebool dontBroadcast)
{
    
int entity FindEntityByClassname(MaxClients 1"info_survivor_position");
    if(
entity == INVALID_ENT_REFERENCE)
        return;

    
float vOrigin[3];
    
GetEntPropVector(entityProp_Send"m_vecOrigin"vOrigin);

    
int iSurvivor;
    static const 
char sOrder[][] = {"1""2""3""4"};
    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsClientInGame(i) || GetClientTeam(i) != TEAM_SURVIVOR)
            continue;
            
        if(++
iSurvivor 4)
            continue;
            
        
entity CreateEntityByName("info_survivor_position");
        
DispatchKeyValue(entity"Order"sOrder[iSurvivor RoundToFloor(iSurvivor 4.0) * 4]);
        
TeleportEntity(entityvOriginNULL_VECTORNULL_VECTOR);
        
DispatchSpawn(entity);
    }

Entity info_survivor_position is needed even for spawn players so that they do not spawn at one point. I think use Striper it is better idea to set unique coordinates for each info_survivor_position
__________________
-

PHP Code:
public OnClientConnect(int Client) {
    
KickClient(Client"sorry");


Last edited by Gold Fish; 02-11-2022 at 07:11.
Gold Fish is offline
 



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 04:07.


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