07.01.2012, 15:04
Well i was making /engine and when i use it outside a car it shows you are not driving a car (that works good) but when i enter a car as a driver and use it, it returns 0 to me
pawn Код:
CMD:engine(playerid, params[])
{
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid,red,"ERROR: You are not driving a vehicle!");
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(vengine[vid] == 0)
{
SetVehicleParamsEx( vid,1, lights, alarm, doors, bonnet, boot, objective );
SendClientMessage(playerid,orange,"You have turned on your vehicle engine!");
vengine[vid] = 1;
}
else if(vengine[vid] == 1)
{
SetVehicleParamsEx( vid,0, lights, alarm, doors, bonnet, boot, objective );
SendClientMessage(playerid,orange,"You have turned off your vehicle engine!");
vengine[vid] = 0;
}
return 1;
}