public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
new string[180];
new engine,lights,alarm,doors,bonnet,boot,objective;
if(newkeys & KEY_SECONDARY_ATTACK) {
enter_apartament(playerid);
if(IsPlayerInRangeOfPoint(playerid,6.0,1959.4673,1017.9394,993.4293)) {
if(RouletteInGame[playerid] == 1) return SCM(playerid,-1,"Deja joci la ruleta.");
for(new t; t<20; t++) if(t != 15) TextDrawShowForPlayer(playerid,CasinoDraw[t]);
SelectTextDrawEx(playerid,0xFFFFFFFF),RouletteInGame[playerid] = 1;
update_ruleta(playerid);
zmidialog[playerid] = 0;
}
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
new car = GetClosestVehicle(playerid);
if(car != INVALID_VEHICLE_ID && IsPlayerNearVehicle(playerid,car,5)) {
for(new i = 0; i < 10; i++) {
if(PlayerInfo[playerid][pCarKey] != 0) {
if(CarInfo[PlayerInfo[playerid][pCarKey]][Spawned] == car) SetVehicleParamsForPlayer(car, playerid, 0, 0);
}
}