Raised This Month: $ Target: $400
 0% 

8 survivors in the rescue vehicle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sorallll
Senior Member
Join Date: Oct 2018
Old 02-11-2022 , 06:55   Re: 8 survivors in the rescue vehicle
Reply With Quote #27

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

sorallll 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