• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team

Mr.Loki

Members
  • Content count

    302
  • Joined

  • Last visited

Community Reputation

55 Popular

About Mr.Loki

  • Rank
    Prankster
  • Birthday 04/08/93

Details

  • Location
    TT
  • Interests
    Give me an apple... and I'll eat it!

Recent Profile Visitors

715 profile views
  1. You gotta use dbPoll to make sure that the query is completed then use the result of the poll. if > 0 then acc exists
  2. count the result of the query if > 0 then there's an account
  3. Reduce the sizes of the images. If it's too large it will take the client a while to load each image. There's no rant to have images that are 2000x2000 when they are only 200x200 in-game.
  4. Oh wait you are using cegui lol use the scrollpane properties here there should be something to sort them.
  5. Oh, you want to wrap the GUI elements not clip. Try using the size of the scrollpane to decide whether the element should be placed under.
  6. guiSetProperty(guiElement,"ClippedByParent","true")
  7. dxCreateRenderTarget
  8. Did you follow the steps correctly?
  9. Just use N++ or sublime autocomplete/syntax highlighter for the function names it helps a lot. function checkVehicles(theElement) -- Check if theElement is a vehicle. if getElementType(theElement) == "vehicle" then -- Get the driver of said vehicle. local driver = getVehicleController( theElement ) -- Check if he belongs to the group and get the count of current vehicles in colshape. if ( getElementData ( driver , "Group" ) == GroupName ) and #getElementsWithinColShape(source, "vehicle") > 15 then -- Sets the position of the player's vehicle. setElementPosition(veh, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) else -- For each player in the vehicle... for _,plr in pairs (getVehicleOccupants( theElement )) do -- execute the sendMsg function. sendMsg(theElement, "Welcome Player") end end end end addEventHandler("onColShapeHit", root, checkVehicles)
  10. @NeXuS™ Well probably he's new to scripting hence his post count is only 7. so I gave him some instructions to see what he could have done on his own and if not after a few tries, then I'd try to line by line explain it to him. Teach him to fish don't give him 1.
  11. At line 2 make a check (getElementType) for "vehicle" so that it only works when vehicles hit it. remove line 2 and 3 that's commented. Use (getElementsWithinColShape) with "vehicle" as the second arg to return a table of all the vehicles in the colshape. So functionThatChecksVehiclesOnTheBase should look like: #getElementsWithinColShape(colShape,"vehicle") adding a # to a table counts it.
  12. Rather.. what resource are you using to /makeshop?
  13. local serial = { ["your_serial"] = true, ["your_serial"] = true, } function checkConnectingSerial( nick, ip, name, ser, iVersion, sVersion ) if not serial[ser] then cancelEvent( true, "Your serial is not on the whitelist." ) end end addEventHandler( "onPlayerConnect", root, checkConnectingSerial ) Not saying that your method is wrong but you can create the table with the serials already in them and you forgot the username parameter before serial. From the WIKI: string playerNick, string playerIP, string playerUsername, string playerSerial, int playerVersionNumber, string playerVersionString
  14. This is the default admin resource. I suggest redownloading the admin resource from here or post the changes you have made to the resource that may be the cause of the error.
  15. Use the code button for code <> near the smiley face. local items = { {"Banana"}, {"Kiwi"}, {"Pizza"} } function fimdoevento(killer) if getElementType(killer) == "player" and getElementData(source,"eventoblip") == true then -- checks if the killer is a player we dont want cars to get the item ._. and if the player killed has the event blip. local item = items[math.random(#items)][1]-- get random table entry. local quantity = math.random(5) -- generate random quantity between 1-5 destroyElement(blip)-- destroy the blip setElementData(source, "eventoblip",false)-- remove the event data from the admin setElementData(killer, "Sniper Rifle Ammo", 150)-- give the killer(player who killed the admin) Sniper ammo outputChatBox ('#00a5ff==============================================================',root,255,255,255,true) outputChatBox ("#00a5ff Congratulations [#FF0000" ..getPlayerName(killer).."#00a5ff] win a [#ff0000 "..quantity.."x "..item.."#00a5ff]!",root,255,255,255,true)-- output messaage with the killer's name outputChatBox ('#00a5ff==============================================================',root,255,255,255,true) end end addEventHandler("onPlayerWasted", root, fimdoevento)