Hey,
I have add a Text Dialog, where i can input my numberplate.
Now its the Problem, when i input a text then dont functionality.
I dont know whats wrong:
DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", "", "", "", "", 5)
while (UpdateOnscreenKeyboard() == 0) do
DisableAllControlActions(0);
Wait(0);
end
if (GetOnscreenKeyboardResult()) then
local inputname = GetOnscreenKeyboardResult()
TriggerServerEvent('veh_SR:CheckMoneyForVeh', this, button.model, button.costs, "car", inputname)
print("Client: "..inputname)
end
Here the EventHandler:
RegisterServerEvent('veh_SR:CheckMoneyForVeh')
AddEventHandler('veh_SR:CheckMoneyForVeh', function(category, vehicle, price ,veh_type, inputname)
local player = vRP.getUserSource({user_id})
MySQL.query("vRP/get_vehicle", {user_id = user_id, vehicle = vehicle}, function(pvehicle, affected)
if #pvehicle > 0 then
vRPclient.notify(player,{"~r~Du besitzt bereits dieses Fahrzeug."})
else
local actual_price = getPrice( category, vehicle)
if actual_price == nil then
print( "Das Auto "..vehicle.." hat in der Kategory "..category.." keinen Festpreis" )
vRPclient.notify(player,{"~r~Dieses Auto ist Ausverkauft!"})
return
end
if actual_price ~= price then
print( "Player-ul cu id-ul "..user_id.. " e suspect de Cheat Engine.")
end
if vRP.tryFullPayment({user_id,actual_price}) then
vRP.getUserIdentity({user_id, function(identity)
MySQL.query("vRP/add_custom_vehicle", {user_id = user_id, vehicle = vehicle, vehicle_plate = "P "..inputname, veh_type = veh_type})
end})
TriggerClientEvent('veh_SR:CloseMenu', player)
vRPclient.notify(player,{"Bezahlt ~r~"..actual_price.."$."})
vRPclient.notify(player,{"Um das Auto ab zu holen, besuchen Sie eine Garage"})
else
vRPclient.notify(player,{"~r~Nicht genug Geld."})
end
end
end)
end)
Don´t come print and don´t open my Event Handler.
Thanks for Help