Jump to content

Wiseguy

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

244 profile views

Wiseguy's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Could you describe this more detailed?
  2. I have worded it wrong, nothing is displayed
  3. Hi, I have a problem with my login panel, it does not display correctly. I would like to get help from you. There are no errors in the console. Client: local screenW, screenH = guiGetScreenSize() windowStart = guiCreateWindow((screenW - 419) / 2, (screenH - 198) / 2, 419, 198, "Panel login v0.1", false) guiWindowSetSizable(windowStart, false) guiSetAlpha(windowStart, 0.57) buttonRegister = guiCreateButton(10, 173, 184, 15, "Zarejestruj", false, windowStart) guiSetProperty(buttonRegister, "NormalTextColour", "FFFEFEFE") buttonLogin = guiCreateButton(227, 173, 182, 15, "Zaloguj", false, windowStart) guiSetProperty(buttonLogin, "NormalTextColour", "FFFFFFFF") editDown = guiCreateEdit(66, 104, 284, 24, "", false, windowStart) editUp = guiCreateEdit(66, 61, 284, 24, "", false, windowStart) addEvent("showHide", true) function showHide() if guiGetVisible(windowStart) == true then guiSetVisible(windowStart, false) showCursor(false) elseif guiGetVisible(windowStart) == false then guiSetVisible(windowStart, true) showCursor(true) end end addEventHandler("showHide", getLocalPlayer(), showHide) showHide() function buttonClick() if source == buttonRegister then local username = guiGetText(editUp) local password = guiGetText(editDown) triggerServerEvent("registerRequest", getLocalPlayer(), getLocalPlayer(), username, password) elseif source == buttonLogin then end end addEventHandler("onClientGUIClick", windowStart, buttonClick) Server: addEvent("registerRequest", true) function registerRequest(player, username, password) local account = getAccount(username) if account == false then local ip = getPlayerIP(player) local serial = getPlayerSerial(player) exports.mysql:_Exec("insert into users (username, password, ip, serial) values (?,?,?,?)", username, password, ip, serial) local addAccounts = addAccount(tostring(username), tostring(password)) if addAccounts then outputDebugString("Użytkownik zarejestrował się z loginem".. username) else outputDebugString("ERROR: Nie udało się zarejestrować") end end end addEventHandler("registerRequest", getRootElement(), registerRequest)
  4. my marker has disappeared, what can I do about it?
  5. could you explain in more detail?
  6. Hey, I put myself a bot that works properly, but I would like to support him with some new features, namely buying weapons. How can I do it? I would ask for a practical guide, I know how it works in theory. The bot is to sell weapons for a certain amount of money, for example, 10,000 per ak47. Sorry for my bad english. Client: function cancelPedDamage ( attacker ) cancelEvent() -- cancel any damage done to peds end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage) GUIEditor = { checkbox = {}, memo = {} } local screenW, screenH = guiGetScreenSize() windowStart = guiCreateWindow((screenW - 441) / 2, (screenH - 317) / 2, 441, 317, "Handlarz bronią", false) guiWindowSetSizable(windowStart, false) guiSetAlpha(windowStart, 0.72) textAk47 = guiCreateEdit(10, 32, 255, 19, "AK-47 | 10, 000$", false, windowStart) buyAk47 = guiCreateButton(283, 31, 148, 20, "Zakup", false, windowStart) textM231 = guiCreateEdit(9, 60, 256, 20, "Karabin M231 FPW | 15, 000$", false, windowStart) buyM231 = guiCreateButton(283, 62, 148, 18, "Zakup", false, windowStart) leaveButton = guiCreateButton(75, 292, 291, 15, "Wyjdz", false, windowStart) markerCreate = createMarker(-369.2470703125, 1202.2958984375, 19.7421875, "cylinder", 1) function guiStart() guiSetVisible(windowStart, true) guiSetVisible(textAk47, true) guiSetVisible(buyAk47, true) guiSetVisible(textM231, true) guiSetVisible(buyM231, true) guiSetVisible(leaveButton, true) showCursor(true) end addEventHandler("onClientMarkerHit", markerCreate, guiStart) function guiStop() guiSetVisible(windowStart, false) guiSetVisible(textAk47, false) guiSetVisible(buyAk47, false) guiSetVisible(textM231, false) guiSetVisible(buyM231, false) guiSetVisible(leaveButton, false) showCursor(false) end addEventHandler("onClientGUIClick", leaveButton, guiStop) Server: function pedCreate() createPed(188, -371.03515625 +2 , 1199.626953125 +2, 19.7421875) end addEventHandler('onResourceStart', getResourceRootElement(), pedCreate) function buyAkPlayer(player) takePlayerMoney(player, 10000) giveWeapon(player, 30, 80) outputChatBox("Otrzymales AK47") end addEventHandler("onClientGUIClick", buyAk47, buyAkPlayer)
×
×
  • Create New...