06.06.2011, 17:11
hello guys plz tell me how i can freeze vehicles for 5 sec for loading objects i make some custom maps and vehicles go in water i want to freeze vehicles for 5 sec
forward VehicleOccupied(vehicleid);
public VehicleOccupied(vehicleid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}
CMD:respawnallvehicles(playerid, params[])
{
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
RepairVehicle(cars);
}
}
return 1;
}
okay
at the top: pawn Код:
pawn Код:
|
SetTimer("CarRespawn",10000,0); // Change the amount of milisecounds to what you need.
forward CarRespawn();
public CarRespawn()
{
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
RepairVehicle(cars);
}
}
return 1;
}
H:\Documents and Settings\Bilawal2o5o\Desktop\poilts life\gamemodes\gtapilots.pwn(4461) : error 017: undefined symbol "VehicleOccupied" H:\Documents and Settings\Bilawal2o5o\Desktop\poilts life\gamemodes\gtapilots.pwn(4467) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
Streamer_UpdateEx( playerid, x, y, z );