Does anyone know how to.......
#1

Can anyone show me how to make a /respawnallcars command (ALSO, they must be unused!)

Thanks
Reply
#2

Command:
Quote:

if (strcmp("/respawnallvehicles", cmdtext, true, 10) == 0)
{
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
RepairVehicle(cars);
}
}
return 1;
}

Somewhere in your gamemode
Quote:

forward VehicleOccupied(vehicleid);
public VehicleOccupied(vehicleid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)