this also can determine your event:
function respFunction(res, evname, evsource, evcl, file, line)
if res == getThisResource() then -- check resource
print("found!")
end
end
addEventHandler("onClientResourceStart",resourceRoot,function()
addDebugHook("preEvent",fix,{"onPlayerCommand"})
end)
you can also attach it to file name and line in your script
https://wiki.multitheftauto.com/wiki/AddDebugHook
1. Create render target.
2. using getSoundFFTData draw several vertical lines
3. apply texreplace shader to vehicle
4. use render target as texture in dxSetShaderValue
5. find a perfect position for texture
this is example from resource page:
ped = createPed(105,0,0,3)
burger = createObject(2880,0,0,0)
exports.bone_attach:attachElementToBone(burger,ped,12,0,0,0,0,-90,0)
try to change bone id: 11 -> 12 and change position + rotation of object
Expected string at argument 1, got boolean means that textureString = nil and modelString = nil (no data found)
attempt to index local 'textures' (a number value) means that textures variable is a number but textures[i+1] means that textures variable have to be a table - different variable types.
Hello everyone! I think i'm missing something but i can't find it
client-side:
setTimer(function()
veh = getPedOccupiedVehicle(localPlayer)
if veh then
paymultiplier = 2
speed = tonumber(getElementSpeed(veh,"km/h"))
--if speed < 0 then speed = -speed end
triggerServerEvent("payMoney",localPlayer,(paymultiplier*speed))
--givePlayerMoney(paymultiplier*speed)
end
end,1000,0)
server-side:
function pay(val)
givePlayerMoney(source,val)
end
addEvent("payMoney",true)
addEventHandler("payMoney",getRootElement(),pay)
Nothing happens server-side. I checked the source: only i see a message with outputChatBox and val is a random number - everything perfect, but still i don't get money. What i'm doing wrong?
Hello community! Imagine that the player pressed F or ENTER button and his character(ped) is running towards the nearest vehicle. Then the player press WASD - any of this buttons and the ped stops. What is the name of this task? ( i need it for getPedTask function)
Hello community! Why this part of code doesn't work?
getBlipIcon(blip) == (32 or 35) then
i really don't want to write
getBlipIcon(blip) == 32 or getBlipIcon(blip) == 35 then
each time (((
timers[player_] = setTimer( -- player_ is not nil
function()
type_ = getElementData(player_,"CreditType") -- player_ becomes nil here
if type_ == "house" then
I think that's better explanation. p.s. everything is server-side