22.06.2011, 19:21
pawn Код:
if(!strcmp(cmd, "/engine", true))
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,doors,bonnet,boot,objective);//Get the engine params
if(engine = 1)//If the engine is on
{
SetVehicleParamsEx(vid,0,lights,doors,bonnet,boot,objective);//Turn off the engine
}
else//If the engine is off
{
SetVehicleParamsEx(vid,1,lights,doors,bonnet,boot,objective);//Turn on the engine
}