#That should work when the item type of

1 messages · Page 1 of 1 (latest)

mental bough
#

So i am trying to figure out a way to check if a vehicle is at its max limit for spawning.

I am trying to figure out a way I can update my bool in SCR_CatalogSpawnerUserAction in CanBePerformedScript without updating it on everyones end.

#

I changed the way I was doing it before. Before I was sending a list to all clients which wouldnt work because i was sending RplId which wasnt converting to an entity on client

#

So now

#

I am making a call in CanBePerformedScript which sends an Rpc to update the m_CanSpawnVehicle for that client.

#

lmk if this could work @covert wasp

#

would it update fast enough and would it only show on a specific client? i am testing now

#

been at this for hours lol

covert wasp
#

It would help to know what you are trying to achieve as your end goal

mental bough
#

to make the spawn board look like this for a vehicle

#

i want to block the spawning of a vehicle if there are say 5 on a faction

mental bough
#

Now I am having issues getting the vehicle name or faction

for ( int i = 0; i < fVeh.Count(); i++ )
        {
            Vehicle ent = Vehicle.Cast(Replication.FindItem(fVeh.Get(i)));
            if (IsEntityDestroyed(ent))
            {
                    Rpc(Rpc_Ask_RemoveVehicleFromList, i);
                    continue;
            }
            
            Print(ent.GetFaction());
            if (ent.GetName() == name)
                count++;
        }