03.11.2011, 00:26
pawn Код:
if(newkeys == KEY_HANDBRAKE)
{
new newcar = GetPlayerVehicleID(playerid);
new string[256];
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
if(engineOn[newcar] == 0)
{
if(IsABike(newcar) || IsATrain(newcar) || IsASweeper(newcar) || IsAPlane(newcar)) { return 1; }
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; }
if(IsAnOwnableCar(newcar)) { if(PlayerInfo[playerid][pPcarkey] == newcar) { } else { return 1; } }
format(string, sizeof(string), "* %s intenta prender el motor del vehiculo.", NombreJugador(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
// aca va el timer de prender el motor del vehнculo, no se como lo tenes vos...
gEngine[playerid] = 1;
return 1;
}
}
}
}