Jump to content

Burak5312

Members
  • Posts

    297
  • Joined

  • Last visited

  • Days Won

    17

Burak5312 last won the day on March 17

Burak5312 had the most liked content!

5 Followers

Recent Profile Visitors

2,859 profile views

Burak5312's Achievements

Hustler

Hustler (26/54)

136

Reputation

2

Community Answers

  1. Is the getConnection function coming from a separate resource?, are you using mysql or sqlite?, if possible, can you show the codes of the getConnection function? and have you tried using exports?
  2. Burak5312

    help

    Can you show the code for the db.lua file?
  3. Burak5312

    help

    Can you show the meta.xml file of the script you connected to the database?
  4. Burak5312

    help

    can you show the codes and meta.xml file?
  5. 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.
  6. what do you mean by interrupted?
  7. try making the loop true --this setPedAnimation(source, "crack", "crckdeth1", -1, true, false, false, true)
  8. 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
  9. 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!")
  10. 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 )
  11. 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)
×
×
  • Create New...