16.09.2013, 14:58
here
pawn Код:
CMD:engine(playerid,params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid, engine,lights,alarm,doors,bonnet,boot,objective);
switch(engine)
{
case 0:
{
SetVehicleParamsEx(vehicleid, 1,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, -1, "You turned the key and the engine started.");
}
case 1:
{
SetVehicleParamsEx(vehicleid, 0, lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, -1, "You turned the key and turned the engine off.");
}
}
}
else return SendClientMessage(playerid, -1, "You have to be the driver to start the engine.");
return 1;
}