pawn Код:
/*Line 3046*/ if (GetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective))
{
Textdraw1 = TextDrawCreate(520.000000,116.000000,"Engine:");
Textdraw3 = TextDrawCreate(559.000000,120.000000,"Off");
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw3,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawBackgroundColor(Textdraw3,0x000000ff);
TextDrawFont(Textdraw1,0);
TextDrawLetterSize(Textdraw1,0.399994,1.600000);
TextDrawFont(Textdraw3,2);
TextDrawLetterSize(Textdraw3,0.299999,1.100000);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawColor(Textdraw3,0xff0000cc);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw3,1);
}
/*Line 3063*/ if (GetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective))
{
Textdraw1 = TextDrawCreate(520.000000,116.000000,"Engine:");
Textdraw2 = TextDrawCreate(559.000000,120.000000,"On");
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw2,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawBackgroundColor(Textdraw2,0x000000ff);
TextDrawFont(Textdraw1,0);
TextDrawLetterSize(Textdraw1,0.399994,1.600000);
TextDrawFont(Textdraw2,2);
TextDrawLetterSize(Textdraw2,0.399999,1.000000);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawColor(Textdraw2,0x00ff00ff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw2,1);
}
}
Hmmm, I was thinking that you may need to do GetVehicleParams before all that, and then see if engine = VEHICLE_PARAMS_ON ? Bad idea.
But, the way I made mine, they were separate publics and had engine = 1 to see if it was on then it toggles the td's. You can always just make a player variable.