Jump to content

Carbonik

Members
  • Posts

    30
  • Joined

  • Last visited

About Carbonik

  • Birthday 22/01/1995

Details

  • Gang
    RM
  • Location
    Poland

Carbonik's Achievements

Rat

Rat (9/54)

0

Reputation

  1. It's all correct: login: You successfully logged in debugscript: Your debug mode was set to 3 start: Resource 'mysql_test' started meta.xml: <meta> <script src="server.lua" /> <include resource="mysql"/> </meta> no debug errors, when I type /test, nothing happens
  2. still doesn't work, I see nothing( and no errors in debug)
  3. It didn't help. Still nothing.
  4. set permissions in acl.xml
  5. Hey Im beginner in SQL programming, I wanted to create simple table and insert data to it... table creates but somehow data can't. addEventHandler( "onResourceStart", resourceRoot, function( ) if not exports.mysql:create_table( 'characters', { { name = 'characterID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'characterName', type = 'varchar(22)' }, } ) then cancelEvent( ) return end end) function testQueryFree(command, player) local result = exports.mysql:query_free("INSERT INTO characters (characterName) VALUES (John Smith)") if result then outputChatBox("You have succesfully inserted new character", player, 255, 255, 255) else outputChatBox("FAIL", player, 255, 255, 255) end end addCommandHandler("test", testQueryFree) Im not even getting fail... whats wrong with it
  6. This is just a fragment I want to move camera like normal around player by mouse function mouse3(cursorX,cursorY) setElementData(localPlayer,"moveX",cursorX) setElementData(localPlayer,"moveY",cursorY) if cursorX > cX then -- move right setCameraMatrix ( x, y1, z2, x, y, z + 1 ) elseif cursorX < cX then -- move left setCameraMatrix ( x, y, z2, x, y, z - 1 ) elseif cursorY > cY then -- move bottom --setCameraMatrix ( x, y, z2, x, y, z - 1 ) elseif cursorY < cY then -- move up --setCameraMatrix ( x, y, z2, x, y, z - 1 ) end end addEventHandler("onClientCursorMove",root,mouse3)
  7. Carbonik

    mass action

    I want to make setpedaimtarget etc for all peds i've got it --416.40151977539,1677.1229248047,36.129425048828 peds = {} addEventHandler("onClientResourceStart",root, function() --spawn_point_1 = createColRectangle(416.40151977539,1677.1229248047,100,50) -- spawn poinT spawn_point_1 = createColSphere(416.40151977539,1677.1229248047,36.129425048828,40) -- spawn point x,y,z = getElementPosition( spawn_point_1 ) for i=0, 10 do -- 20 mobs peds[1] = createPed(0,x+math.random(-15,15),y+math.random(-15,15),z) end end ) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end addCommandHandler("warpme", function() setElementPosition(localPlayer,416.40151977539,1677.1229248047,36.129425048828) end ) addCommandHandler("tests", function() local dx,dy,dz = getElementPosition( localPlayer ) ss = createPed(0,dx,dy,dz) end ) addEventHandler("onClientElementColShapeHit",root, function(theShape, matchingDimension) if theShape == spawn_point_1 then if ( getElementType( source ) == "player" ) and ( source == getLocalPlayer( ) ) then for k,v in ipairs(peds) do local ax,ay,az = getElementPosition( localPlayer ) setPedAimTarget(v,ax,ay,az) setPedControlState(v,"fire",true ) local zx,zy,zz = getElementPosition(localPlayer) local tx,ty,tz = getElementPosition(v) setPedRotation(v, findRotation(tx,ty,zx,zy) ); end end end end ) what should I do to make action for peds with this variable? addEventHandler("onClientElementColShapeHit",root, function(theShape, matchingDimension) if theShape == spawn_point_1 then if ( getElementType( source ) == "player" ) and ( source == getLocalPlayer( ) ) then for k,v in ipairs(peds) do local ax,ay,az = getElementPosition( localPlayer ) setPedAimTarget(v,ax,ay,az) setPedControlState(v,"fire",true ) local zx,zy,zz = getElementPosition(localPlayer) local tx,ty,tz = getElementPosition(v) setPedRotation(v, findRotation(tx,ty,zx,zy) ); end end end end
  8. How to use client variable in server side? for example; client side: myped = createPed(120, x,y,z) and how i can use myped variable in server side? i want to set myped variable in server side server side: warpPedIntoVehicle(myped, somevehicle)
  9. where i can find it? example: elseif,ipairs or something, if, thePlayer etc. where i can find list?
  10. function(hitElement, matchingDimension) if (getElementType( hitElement ) == "player") then if (source == shipManChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Stary szalony facet\n\nHEJ HEJ!\nCo robisz na moim statku, \nNie zapraszalem cie!\nIdz stad!") elseif (source == shipWomanChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Stara baba z duzymi butami\n\nWitaj na naszym statku.\nProsze nie zepsuj niczego \nmoj maz jest bardzo rozdrazniony") elseif (source == medicChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Szczesliwy lekarz\n\nWitaj w naszym szpitalu.\nGdy bedziesz mocno ranny znajdziesz sie tu!\n\nDo zobaczenia!\n...ahh lubie operowac ludzi") elseif (source == coureurChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Pan Iwan Nadie\n\nWitaj na naszym stadionie.\nMozesz tu sie wyszalec! za zdobycie okregu\ndostaniesz 100$! Koszt wejscia 500$!\n\nPowodzenia, mysle ze zginiesz \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />.") elseif (source == farmerChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Jakis farmer\n\nPewnie myslisz na co tak patrze?\nSzatanisci sa tutaj, Modla sie do szatana w tych kregach!\n\nIdz w dol sciezka a tam bedzie grota, powodzenia!") elseif (source == NeilArmstrongChatMarker) then triggerClientEvent (hitElement, "viewInfoGUIWindow", hitElement, "Neil Armstrong\n\nWitam.\nJako pierwszy wyladowalem na ksiezycu, \nTo naprawde fascynujaca przygoda!\nSprobuj!") end end end) it dont work ;/
  11. Hi, how i can set map in all dimensions?
  12. in 1.1 we can too add our own anims? (.ifp etc)
  13. hi i have problem i want to make new anim when i ride a bike.... someone know how to make it? functions or example pls.
  14. Hi i have problem... Where i can get all id's for world elements example: some road or something.... (textures from sa id)
×
×
  • Create New...