When Engine starts ,
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new vehicleid = GetPlayerVehicleID(playerid);
   
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(vehEngine[vehicleid] == 0)
        {
            if(newkeys == KEY_JUMP)
            {
                new str[128], Name[MAX_PLAYER_NAME], pPos[3];
                GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
                GetPlayerName(playerid, Name, sizeof Name);
                format(str, sizeof str, "%s started the vehicle engine.", Name);
                for (new i = 0;  i<MAX_PLAYERS;  i++)
                {
                          if(IsPlayerInRangeOfPoint(i, 20, Pos[0], Pos[1], Pos[2]))
                                        SendClientMessage(i, 0xF9B7FFAA, str);
                 }
                vehEngine[vehicleid] = 2;
                SetTimerEx("StartEngine", 3000, 0, "i", playerid);
                SendClientMessage(playerid, 0x33AA33AA, "Vehicle engine starting");
                return 1;
            }
        }
        if(newkeys == KEY_SECONDARY_ATTACK)
        {
            RemovePlayerFromVehicle(playerid);
            TogglePlayerControllable(playerid, 1);
        }
    }
    return 1;
}
Reply


Messages In This Thread
When Engine starts , +rep - by Jaber_Brown - 13.03.2012, 22:15
Re: When Engine starts , - by Jaber_Brown - 13.03.2012, 22:46
Re: When Engine starts , - by antonio112 - 13.03.2012, 23:36
Re: When Engine starts , - by Jaber_Brown - 14.03.2012, 10:42
Re: When Engine starts , - by PawnFox - 14.03.2012, 10:54
Re: When Engine starts , - by TTJJ - 14.03.2012, 11:05
Re: When Engine starts , - by Jaber_Brown - 14.03.2012, 11:14
Re: When Engine starts , - by TTJJ - 14.03.2012, 11:24

Forum Jump:


Users browsing this thread: 2 Guest(s)