14.01.2012, 19:23
pawn Код:
CMD:eon(playerid, params[])
{
if(LoggedIn[playerid] == 0)
return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOUR_GREY, "You are not in a vehicle.");
GameTextForPlayer(playerid, "~g~Engine starting...", 2500, 5);
SetTimerEx("EngineOn", 3000, false, "i", playerid);
return 1;
}
forward EngineOn(playerid);
public EngineOn(playerid)
{
GameTextForPlayer(playerid, "~g~Engine started!", 1500, 5);
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
return 1;
}