Jump to content

Burak5312

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    17

Burak5312 last won the day on March 17

Burak5312 had the most liked content!

4 Followers

Recent Profile Visitors

2,716 profile views

Burak5312's Achievements

Hustler

Hustler (26/54)

135

Reputation

2

Community Answers

  1. I tested the code, as you said, it breaks the animation when the shift key is pressed, I'm not sure, but this may be a bug.
  2. what do you mean by interrupted?
  3. try making the loop true --this setPedAnimation(source, "crack", "crckdeth1", -1, true, false, false, true)
  4. actually everything looks right here, if you want to cancel this event, I say go to the client side, but the onPlayerDamage event cannot be canceled and will be ineffective when you animate the player, so your code looks correct, but you can delete the second localPlayer parameter in the triggerServerEvent, instead use the source inside the server event triggerServerEvent("wastedEvent", localPlayer) --use source on server side so no second localPlayer parameter is required
  5. Burak5312

    Support

    root will send it to everyone change it to hitElement if you are going to send it only to the player who entered the marker --this triggerEvent( "addNotification", hitElement, "Você precisa da skin do CJ antes de poder definir a roupa!")
  6. When the onPlayerJoin event is triggered, the client-side file may not be loaded yet. You can solve this on the client-side with the "onClientResourceStart" event, so the panel will open when the files are loaded. GUIEditor = { window = {}, label = {}, edit = {}, button = {}, } function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 return guiSetPosition(center_window, x, y, false) end GUIEditor.window[1] = guiCreateWindow (0, 0, 300, 400, "Test", false) centerWindow (GUIEditor.window[1]) guiSetVisible (GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel (20, 50, 100, 70, "Test", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit (20, 90, 200, 30, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton (20, 150, 150, 40, "Button", false, GUIEditor.window[1]) function openGUI(bool) if (bool == true) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end addEvent ("showGUI", true) addEventHandler ("showGUI", root, openGUI) addEventHandler("onClientResourceStart", resourceRoot, function() openGUI(true) --open panel when client side files are loaded end )
  7. try this local function default3SBuy() guiSetEnabled(skinPayButton3, false) local money = getPlayerMoney(localPlayer) --replace with localPlayer local id = getElementModel(localPlayer) --replace with localPlayer if (money < 500) then --if the player's money is less than 0 go no further outputChatBox("You don't have enough money! (500$)", 255, 0, 0) guiSetVisible(skinPayButton3, true) return end if id == 284 then --getElementType is unnecessary in this case outputChatBox("You already pruchased this skin!", 255, 0, 0) end outputChatBox("You purchased a Humvee! (500$)", 0, 255, 0) takePlayerMoney(500) --this might be problem for server side i suggest you to do it using triggerServerEvent setElementModel(localPlayer, 284) end addEventHandler("onClientGUIClick", skinPayButton3, default3SBuy, false)
  8. extra parameter is passed here can you try deleting the true part triggerServerEvent("addVehiclePaintJob", localPlayer, veh, model, id, true) -- <-- this triggerServerEvent("addVehiclePaintJob", localPlayer, veh, model, id)
  9. change source to localPlayer addCommandHandler("pj", function(cmd,id) local veh = getPedOccupiedVehicle(localPlayer) --this if veh then local id = tonumber(id) or 0 local model = getElementModel(veh) if availablePaintJobs[model] and availablePaintJobs[model][id] then setElementData(veh, "tuning.paintjob", id) triggerServerEvent("addVehiclePaintJob", localPlayer, veh, model, id, true) end end end)
  10. isObjectInACLGroup is server side function you can't use it on client side use triggerServerEvent and triggerClientEvent to do this split your code into pieces
  11. Try changing thePlayer to localPlayer addCommandHandler("pj", function(cmd,id) local plrAccName = getElementData(localPlayer, 'accName') --change thePlayer to localPlayer if isObjectInACLGroup("user."..plrAccName, aclGetGroup("Admin")) or isObjectInACLGroup("user."..plrAccName, aclGetGroup("Owner")) then local veh = getPedOccupiedVehicle(localPlayer) if veh then local id = tonumber(id) or 0 local model = getElementModel(veh) if availablePaintJobs[model] and availablePaintJobs[model][id] then setElementData(veh, "tuning.paintjob", id) triggerServerEvent("addVehiclePaintJob", localPlayer, veh, model, id, true) end end end end)
×
×
  • Create New...