28.01.2015, 14:59
Hello , i have a bug in my Gamemode but i don't know how to fix it . I tried many of Car Owner Ship Fs . But they are bugged due to a bug in my Gamemode . The Bug is that when player enters into a vehicle and try to buy it or Don't buy the the script remove the player from vehicle but he again enters into the vehicle automatically (i mean without the animation of entering into car) . Following is my code of Buying Vehicle (when player successfully buy a vehicle).
PHP код:
GivePlayerMoney(playerid, -DealershipVehicles[GetPlayerVehicleID(playerid)][vPrice]);
format(string, sizeof(string), "You have purchased a %s for $%d, for more help regarding your purchase, type /carhelp.", GetVehicleName(GetPlayerVehicleID(playerid)), DealershipVehicles[GetPlayerVehicleID(playerid)][vPrice]);
SendClientMessage(playerid, YELLOW, string);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}