26.12.2011, 18:14
How would I create a delay....
I.E
/engine
Code here
Delayhere
Message: engine on!
How could I do this?
I.E
/engine
Code here
Delayhere
Message: engine on!
How could I do this?
defer CallDelayHere(playerid);
timer CallDelayHere[timeinmshere](playerid)
{
// Whatever you want to do here...
}
//add this in function
SetTimerEx("StartEngine",1000/*one second */,true,"d",GetPLayerVehicleID(playerid));
//somewhere else
public StartEngine(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1,lights, alarm, doors, bonnet, boot, objective);
return 1;
}