IS there away to check if any cars are empty for so long that they respawn.
Yes i think... i am using SATDM and when i open the File i can see if its owned by somebody or else!
You can just set the respawn delay right? So far I know cars only respawn when they are empty.
So when you get out the car, this car will respawn after the respawn delay has been timed.
You can do this with car in the Gm script but ive got a cmed to spawn a vehicle what i cant set the delay on or can i ?
Код:
CMD:v(playerid, params[])
{
if(DeathMatch[playerid] != 0) return SendClientMessage(playerid, COLOR_RED, "You can not TP from DM. Use /exitdm to leave.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "* You must leave this vehicle to spawn a new one!");
new
sCar,
VehicleID,
Float:X,
Float:Y,
Float:Z,
Float:Ang,
Int;
if(unformat(params, "s[20]", params)) return SendClientMessage(playerid, COLOR_RED, ""#CRED"USAGE: "#CORANGE"/Car < CarID | Model >");
sCar = GetVehicleModelIDFromName(params);
if(sCar < 400 || sCar > 611) return SendClientMessage(playerid, COLOR_RED, "* Invalid vehicle model!");
if ( sCar == 425 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" ); /* <---- */
if ( sCar == 432 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
if ( sCar == 447 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
if ( sCar == 425 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
if ( sCar == 464 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
if ( sCar == 476 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
if ( sCar == 520 ) return SendClientMessage( playerid, -1, "This Vehicle is Blocked" );
GetPlayerPos(playerid,X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
Int = GetPlayerInterior(playerid);
VehicleID = CreateVehicle(sCar, X, Y, Z, Ang, -1, -1, -1);
SetVehicleVirtualWorld(VehicleID, GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, VehicleID, 0);
LinkVehicleToInterior(VehicleID, Int);
SendFMessage(playerid, -1, ""#CORANGE"You have spawned a: "#CBLUE"%s "#CWHITE"- "#CBLUE"%d", VehicleNames[sCar - 400], sCar);
return 1;
}