Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. You need attach it to player hand attachElements getKeyState fireWeapon setWeaponState setPedAimTarget
  2. function test() local x, y, z = getElementPosition(localPlayer) local weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 120) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "firing") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) attachElements(weapon, newAK) end addCommandHandler("aktest", test)
  3. local result, num_affected_row= dbPoll(dbQuery(mysql, "SELECT matrica FROM vehicle WHERE id=?", vehicle:getData("veh:id")), - 1) if(num_affected_row >= 1) then dbExec(mysql, "UPDATE vehicle SET paintjob = ? WHERE id = ?", paintjob, vehicle:getData("veh:id")) else outputChatBox ( "Előbb szedd le a matricát!" ) end
  4. local result = dbPoll(dbQuery(mysql, "SELECT matrica FROM vehicle WHERE id=?", vehicle:getData("veh:id")), - 1) if(#result >= 1) then dbExec(mysql, "UPDATE vehicle SET paintjob = ? WHERE id = ?", paintjob, vehicle:getData("veh:id")) else outputChatBox ( "Előbb szedd le a matricát!" ) end
  5. function steeringwheel() local theVeh = getPedOccupiedVehicle(localPlayer) if getVehicleComponentRotation == handlingGetSteeringLock then local rotX, rotY, rotZ = getVehicleComponentRotation (theVeh, "steer" ) setVehicleComponentRotation(theVeh,'steer',rotX,rotY,rotX*10) end end addEventHandler("onClientRender", root, steeringwheel)
  6. local result = dbPoll(dbQuery(mysql, "SELECT matrica FROM vehicle WHERE id=?", vehicle:getData("veh:id")), - 1) if(#result == 1) then dbExec(mysql, "UPDATE vehicle SET paintjob = ? WHERE id = ?", paintjob, vehicle:getData("veh:id")) else outputChatBox ( "Előbb szedd le a matricát!" ) end
  7. No start script yourself and make it out of scratch
  8. Change thePlayer to localPlayer
  9. Its client side pictures not showed CLİENT CODE function createMinigunWeapon() -- Create the weapon 1 meter above the player local x, y, z = getElementPosition(getLocalPlayer()) local weapon = createWeapon("ak-47", -2413.2534179688, -593.76226806641, 134 + 1) -- Give it some ammo and fire it setWeaponClipAmmo(weapon, 0) setWeaponState(weapon, "ready") end addCommandHandler("silah", createMinigunWeapon)
  10. You can do that all you need to do is go acl everyone and do that <acl right="command.login" access="false" /> <acl right="command.register" access="false"/>
  11. You can use costum login system that register account both database and mta
  12. you can download the db from your server and look it from squlitebrowser
  13. addEventHandler("onPlayerTarget", getRootElement(), function(targetEl) if exports.bcho:isCriminal(source) then if(targetEl) then if(getElementType(targetEl) == "ped") then if(not getElementData(source, "rob")) then if(getElementData(targetEl, "robLoc") ~= false) then robloc = getElementData(targetEl, "robLoc") setElementData(source, "rob", robloc) setElementData(source, "Charges", tonumber(getElementData(source, "Charges"))+1000) if getElementInterior(source) ==0 then triggerClientEvent(source, "StartRobTimer", getRootElement()) end exports.Messages:sendClientMessage("Store Robbery: Don't get arrested/killed or you will fail the robbery",source, 255, 100, 0) end end end end end end) addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function() for k, v in ipairs(getElementsByType("player")) do setElementData(v, "rob", false) end end) Try this
  14. getElementInterior 0 is world
  15. A easy way to find it is go there and click and press f2
  16. You can have a global database and resource conect it but you need to expprt the function to this resource ofc that is example you need table etc for working correct function connectToDatabase() connection =dbConnect("sqlite", ":/global.db") end addEventHandler("onResourceStart", resourceRoot, connectToDatabase) function getConnection () return connection end
  17. Well you use addEvent to make a costum event on server side or client side you need use addEventHandler for work and then if you want used on server side but it was added on client side triggerClientEvent if was added on server side and you want to use it you need triggerServerEvent addEvent addEventHandler triggerClientEvent triggerServerEvent
  18. function createC4(thePlayer) local x, y, z = getElementPosition(thePlayer) theObject = createObject(1225, x, y, z, 0,0 0) if theObject then outputConsole("Object created successfully", thePlayer) else outputConsole("Failed to create object", thePlayer) end end addCommandHandler("createObject", createC4)
×
×
  • Create New...