Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. Wei

    String lenght

    I've been inactive for a while and i've forgot some things about MTA Lua. How can I get the string lenght ?
  2. helped him via Skype.
  3. Wei

    SQL

    Thanks
  4. Wei

    SQL

    any1 ?
  5. Wei

    SQL

    I have 2 questions more. addEvent("groupSystem:isCreator", true ) addEventHandler("groupSystem:isCreator", getRootElement(), function( ) local isCreator = executeSQLSelect("group_", "groupCreator", "groupCreator = '"..getAccountName(getPlayerAccount(source)).."'") if isCreator then triggerClientEvent(source, "groupSystem:showRemoveGroup", source, true ) end end ) why this allways returns true ? addEvent("groupSystem:removeGroup", true ) addEventHandler("groupSystem:removeGroup", getRootElement(), function() executeSQLDelete("group_", "groupName = '"..getElementData(source, "Group").."'") end ) How can I make this that it will remove the whole line ?
  6. Wei

    SQL

    Thanks it works !
  7. Wei

    SQL

    executeSQLInsert ( "group", "'"..groupName.."', '"..groupTag.."', '" .. groupType .. "', '"..groupColorR.."', '"..groupColorG.."', '"..groupColorB.."', '"..getAccountName(getPlayerAccount(source)).."'" ) I can't f****** find whats wrong.... ERROR:Database query failed: near "group": syntax error
  8. Wei

    Stack overflow

    marker = createMarker ( 2726.98633, -2015.18066, 12.55469, "cylinder", 1.5, 255, 255, 0, 170 ) markere = { { 2701.85010, -2007.65076, 13.39157 }, { 2696.19385, -1999.32336, 13.30278 }, } function create () local x,y,z = unpack ( markere [ math.random ( #markere ) ] ) createMarker ( x, y, z+2, "arrow", 1.5, 255, 255, 0, 170 ) createVehicle ( 411, x, y, z) end addEventHandler("onMarkerHit", marker, create)
  9. username = get( "username" ) or "root" password = get( "password" ) or "asd" db = get( "database" ) or "mta" host = get( "hostname" ) or "127.0.0.1" port = tonumber( get( "3306" ) ) or 3306 try using localhost instead of 127.0.0.1
  10. Wei

    how

    I don't want to follow it... I've finished this resource
  11. Wei

    how

    I mean this. Thanks
  12. if hasObjectPermissionTo( source, "function.kickPlayer" ) then
  13. Wei

    how

    function carCamera(source) fadeCamera(source, true, 5) setCameraMatrix(source, 1121.64282, -1449.44080, 22.49406, 1124.53772, -1459.35596, 15.79688, 0, 180, 180) showPlayerHudComponent( source, "radar", false ) showCursor( source, true ) end how can I spawn back player ?
  14. bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) spawnPlayer Last argument...
  15. Wei

    color picker

    addEventHandler("onClientGUIClick", guiRoot, function() if source == vehicleShop["Color1Button"] then openPicker(localPlayer) end end ) addEventHandler("onColorPickerOK", root, function(element, hex, r, g, b) triggerServerEvent("setColor", r, g, b ) end ) why it doesn't work ? It opens but it doesn't trigger event
  16. Wei

    how

    k Thanks
  17. Wei

    how

    How can I make this work ? veh = createVehicle( 411, 1124.53772, -1459.35596, 15.79688 ) function lol ( source ) setCameraTarget( source, veh ) end addCommandHandler("t", lol )
  18. height = 0 --put Your Height Here function setMyMaxHeight ( ) setAircraftMaxHeight ( height ) end addEventHandler("onResourceStart", getRootElement(), setMyMaxHeight)
  19. If you mean on resource start then use addEventHandler("onResourceStart", getRootElement(), setAircraftHeight)
  20. Wei

    SQL Question

    Thank You !
  21. for _, thePlayer in ipairs (getElementsByType("player")) do local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( thePlayer ) ) ) if (gang == "SWAT" ) then setPedStat ( thePlayer , 24, 200 ) end end Maybe this will work
  22. Wei

    SQL Question

    ERROR: a\sDatabase.lua:12: attempt to index field '?' (a nil value)
  23. Wei

    SQL Question

    I want it that it will get it from SQL !! Not getAccountName...
×
×
  • Create New...