Small help plz.
#1

Hi,

Can anyone tell me how do i make that GameTextForPlayer only shows once when the engine turned on? I mean, when the player already has his/her engine turned on and they press the fire button, it sends the GamText again. More and more whenever they press fire key. I couldn't figure out how to make it showing only once when they turn it on.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (GetPlayerVehicleSeat(playerid) == 0)
    {

      if (newkeys & KEY_FIRE)
      {
        new engine, lights, alarm, doors, bonnet, boot, objective;
        new vehicleid = GetPlayerVehicleID(playerid);
     
        if (AVehicleData[vehicleid][Fuel] > 0)
        {
           GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
           SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
           GameTextForPlayer(playerid, "~w~Engine turned ~g~on", 2000, 1);
           TextDrawHideForPlayer(playerid, APlayerData[playerid][VState]);
        }
       
      }
     
    }
    return 1;
}
Reply


Messages In This Thread
Small help plz. - by iOxide - 03.01.2014, 17:29
Re: Small help plz. - by iggy1 - 03.01.2014, 17:34
Re: Small help plz. - by iOxide - 03.01.2014, 17:39
Re: Small help plz. - by iggy1 - 03.01.2014, 17:46
Re: Small help plz. - by iOxide - 03.01.2014, 17:48
Re: Small help plz. - by iggy1 - 03.01.2014, 18:03
Re: Small help plz. - by iOxide - 03.01.2014, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)