Can you tell me what's the problem?
#6

more exaxtly I did this:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{

    new vehicleid=GetPlayerVehicleID(playerid);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
       GetVehicleModel(vehicleid);
       if(vehicleid == 431)
       {
          GetPlayerSpeed(playerid,true);
          if(GetPlayerSpeed(playerid,true) > 60)
          {
             GameTextForPlayer(playerid,"A bomb has been planted on your bus,don't slow down below 50mph or you'll be blowed up",7500,4);
             if(PRESSED(KEY_BRAKE/REVERSE))
             {
                GetPlayerSpeed(playerid,true);
                if(GetPlayerSpeed(playerid,true) < 50)
                {
                   SetVehicleHealth(vehicleid,0);
                   SendClientMessage(playerid,RED,"BYE BYE!!!");
                }
             }
          }
       }
     }
    return 1;
}

public OnPlayerKeyStateChange
{
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    return 1;
}
Reply


Messages In This Thread
Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:02
Re: Can you tell me what's the problem? - by Mean - 20.04.2011, 14:04
Re: Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:09
Re: Can you tell me what's the problem? - by Mean - 20.04.2011, 14:14
Re: Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:17
Re: Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:19
Re: Can you tell me what's the problem? - by Stigg - 20.04.2011, 14:20
Re: Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:23
Re: Can you tell me what's the problem? - by Stigg - 20.04.2011, 14:26
Re: Can you tell me what's the problem? - by Cjgogo - 20.04.2011, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)