Jump to content

Baseplate

Members
  • Posts

    1,417
  • Joined

  • Last visited

Everything posted by Baseplate

  1. vehicleIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 } for _, v in ipairs (vehicleIDS) do comboitem = guiComboBoxAddItem(vehs, getVehicleNameFromModel(v)) end Currently this is my code, how can I sort the names on the combobox by alphabet?
  2. How can I exactly use it?
  3. Baseplate

    Muting

    Never mind, Castro was right as the function name was the same button variable, changed it and works. Thanks everyone
  4. OOPS! Sorry lol, my mind isn't working correctly these days.
  5. executeSQLQuery is server sided only, and I'm even questioning if you really can script. Client function createLoginWindow(thePlayer) showCursor(true, true) wdwLogin = guiCreateWindow(0.425, 0.425,0.15, 0.15, "Type your character's name", true) cname = guiCreateEdit(0.25, 0.2, 0.5, 0.15, "", true, wdwLogin) guiEditSetMaxLength(cname, 15) btnLogin = guiCreateButton(0.375, 0.7, 0.25, 0.2, "Save", true, wdwLogin) addEventHandler ( "onClientGUIClick", btnLogin, saveNick, false ) outputDebugString( "leves" ) end addCommandHandler("leves", createLoginWindow) function saveNick(button) if button == "left" then local nickname = guiGetText ( cname ) triggerServerEvent("saveCharacter", nickname) guiSetVisible(wdwLogin, false) destroyElement ( wdwLogin ) showCursor ( false ) end end Server addEvent("saveCharacter", true) addEventHandler("saveCharacter", root, function(nickname) executeSQLQuery("INSERT INTO accounts(character) VALUES(?)", nickname) end )
  6. Baseplate

    Muting

    Made this code, not working, no output no muting. Client side: function mutePlayer() local player = guiGridListGetItemText (sPlayersList, guiGridListGetSelectedItem (sPlayersList), 1) if (source == mutePlayer) then if (guiGridListGetSelectedItem(sPlayersList) == -1) then outputChatBox("Supporter Panel: You should select player from the players list first!", 230, 0, 0) elseif (guiGridListGetSelectedItem(sPlayersList) ~= -1) then local secs = tonumber(guiGetText(secEdit)) local thePlayer = getPlayerFromName(player) local msecs = math.ceil(secs * 1000) local reason = guiGetText(reasonEdit) triggerServerEvent("supporterMute", getRootElement(), thePlayer, localPlayer, secs, msecs, reason) end end end addEventHandler("onClientGUIClick", root, mutePlayer) Server side: function mutePlayer(thePlayer, muter, secs, msecs, reason) if (thePlayer) then local me = getPlayerName(muter) local isMuted = isPlayerMuted(thePlayer) if (isMuted == false) then setPlayerMuted(thePlayer, true) outputChatBox(""..getPlayerName(thePlayer).." has been muted by "..me.." for "..secs.." ("..reason..")", root, 250, 0, 0) setTimer(function(mutedPlayer) setPlayerMuted(mutedPlayer, false) outputChatBox(""..getPlayerName(mutedPlayer).." has been unmuted.", getRootElement(), 0, 255, 0) end, msecs, 1, thePlayer) else setPlayerMuted(thePlayer, false) outputChatBox(""..getPlayerName(thePlayer).." has been unmuted by "..me, getRootElement(), 0, 250, 0) end end end addEvent("supporterMute", true) addEventHandler("supporterMute", root, mutePlayer)
  7. Use createVehicle serversided else the vehicle won't sync with the server, so just add the event server side and trigger it client side with some checks.
  8. function speedup (thePlayer) if (getElementModel(source) == 596) then local handlingTable = getVehicleHandling (source) local newVelocity = ( handlingTable["maxVelocity"] + ( handlingTable["maxVelocity"] / 100 * 40 ) ) setVehicleHandling ( source, "numberOfGears", 5 ) setVehicleHandling ( source, "driveType", 'awd' ) setVehicleHandling ( source, "maxVelocity", newVelocity ) setVehicleHandling ( source, "engineAcceleration", handlingTable["engineAcceleration"] +8 ) end end addEventHandler("onVehicleEnter", root, speedup)
  9. Well, if someone is an asshole, what will you call him? it is just I didn't mean to say all the Paki people are assholes, just this bunch of fools.
  10. I apologize for making it soo general, but it is mostly the GTA-PK.net community was the f*gs trying to f*ck our VPS. I apologize again.
  11. So should I loop through it?
  12. Thank you Shigawire, I was working as a Staff there for free and I liked being there but left later on due to a lack of time but came to agree with Shigawire a bit here. First, some paki assholes making multiple accs and having 3 servers instead of 1. Second, how do you expect an asshole to run a server without even the knoweldge of acl.xml? magic? probably, they even come and annoy everyone of us just to edit their fucking acl.xml but yet we've helped them doing it. Vortex-Servers, thanks for your interest but, piss off.
  13. How to get a vehicle's unoccupied seat?
  14. We miss you Luka, great friend of mine, helped me solving alot of issues with my crush and showed a great loyaity and maturity, thank you mate, thank you for everything.
  15. Baseplate

    Bad args

    I've been trying to find a solution since a month, finally it works, thanks everyone.
  16. Baseplate

    Bad args

    Yeah, the script inserts some data if there is none.
  17. Right, thanks castillo! works like a charm.
  18. Baseplate

    Bad args

    No errors, but still doesn't save..
  19. Baseplate

    Comboboxes

    vehs = guiCreateComboBox(495,400,207,30,"Select a vehicle",false,staffWindow) vehicleIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 } for _, v in ipairs (vehicleIDS) do comboitem = guiComboBoxAddItem(vehs, getVehicleNameFromModel(v)) end Well, it doesn't add anything to the combobox, it remains empty.
  20. Baseplate

    Bad args

    lol, do you actually realize dbExec is server sided only??...
×
×
  • Create New...