Respawn cars...
#1

I have a problem, I want that then car is staying alone and nobody drive this car, car automaticaly respawns, but if I drive this car, car doesn't respawn but if I get out of the car she instantly respawn. How I can do that car respawns only then 10 minutes nobody drives this car but if somebody drive this car and then get out of the car, car respawns only after 10 minutes nobody drives this car This my code:
Код:
AddStaticVehicleEx(413,-1766.41894531,-169.95703125,3.70468760,266.00000000,0,44,10);
I think there need to be SetTimer(...) and please correct my code or write here your own code.
I have one more problem, I want to do a work cars and only this work workers can drive this cars.How I can do that other peoples which not in this work can't drive this cars ant then they sit in the car them remove from car RemovePlayerFromCar(...)
Reply
#2

Код:
AddStaticVehicleEx(413,-1766.41894531,-169.95703125,3.70468760,266.00000000,0,44,10);
You made it to respawn in 10 seconds.. make that 600 for 10 minutes
Reply
#3

Thank you for your support... Do you have another ideas for my second problem?
Reply
#4

Quote:
Originally Posted by Vvolk
Посмотреть сообщение
Thank you for your support... Do you have another ideas for my second problem?
Try something like:

pawn Код:
new WorkVehicle[10];//The number of work vehicles

WorkVehicle[0] = AddStaticVehicle(//whatever your wish);
WorkVehicle[1] = AddStaticVehicle(// whatever your wish);
WorkVehicle[2] = AddStaticVehicle(// whatever your wish);
//Ect...
//Use a loop here, then you can use:
if(vehicleid == WorkVehicle[i])
{
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, red, "This is a work vehicle!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)