Jump to content

Addlibs

Members
  • Posts

    1,060
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Addlibs

  1. local m = getElementMatrix( theVehicle ) local pitch = math.deg( math.asin( m[2][3] ) ) -- (-90,90) local roll = math.deg( math.atan2( m[1][3], m[3][3] ) ) --(-180,180) - You should only need this one (roll) local yaw = math.deg( math.atan2( m[2][1], m[2][2] ) ) --(-180,180) You can do the rest.
  2. dbExec( connection, "CREATE TABLE names (column1 TEXT, column2 TEXT)") dbExec( connection, "INSERT INTO names (column1, column2) VALUES (?,?)", 4, "test2" ) function testing( allnames ) local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local column = guiGridListAddColumn( playerList, "Player", 0.85 ) for k,v in pairs(allnames) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, v["column2"], false, false ) end end addEvent("onStart",true) addEventHandler("onStart",localPlayer,testing)
  3. table getBoundKeys ( string command/control )
  4. If it's an object with edited .dff/.txd to make it have the fire particles, you can use engineSetModelLODDistance on it (but I'm not sure if it would have an effect on it). Although, MTA v1.4 already brings in createEffect which you can use to get the fire particle.
  5. https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
  6. Line 18: Marker1 is defined as a local variable in the wrong scope. Possible solution: Don't make Marker1 a local variable, then change line 35 to attach to 'root' and add a check between line 27 and 28: if source == Marker1 then else return end
  7. Addlibs

    help xml

    getPlayerSerial ( punishedPlayer )
  8. Addlibs

    Save Weapopns

    Also attach onPlayerLogout event to onPlayerQuit function and test for any /debugscript 3 messages when using /logout (debugscript should stay open when logging out) There must be a reason why account data wasn't set.
  9. Addlibs

    help xml

    Line 5: local punishedPlayer = getPlayerName(target) Don't you mean getPlayerFromName(target) ? You're trying to insert a string value in the place of a element argument...
  10. Try using addEventHandler("onClientResourceStart", resourceRoot, function() for _, downFile in pairs( downloadFiles ) do downloadFile ( downFile[1] ) end end)
  11. local plrTeam = getPlayerTeam( thePlayer ) guiSetText(Ocupacion,(plrTeam and getTeamName(plrTeam) or "None"))
  12. --trigger it from serverSide triggerClientEvent(thePlayer, "showTimeLeft", thePlayer, getTickCount() + 60000) Is thePlayer defined?
  13. Yeah, that's what I think - maybe it's just for the purpose of "ignoring" it, cause if you don't see what is the actual variable about, you won't use it (?)
  14. Just defines the variable you'd use, if you put 'HelloWorld', You'd have to use outputChatBox(HelloWorld) to get it to output whatever was in the place of the parameter... eg: --Version 1: addEventHandler("onPlayerWasted", root, function(ammo) outptuChatBox("Ammo: "..ammo, root, 255, 255, 255, false) end) --Version 2: addEventHandler("onPlayerWasted", root, function(HelloWorld) outptuChatBox("Ammo: "..HelloWorld, root, 255, 255, 255, false) end) --They work exactly the same
  15. It doesn't actually matter, does it?
  16. test with onClientRender + dxDrawText(tostring(getKeyState( --[[whatever you want]] )), 0, 0) -- draws at top left corner
  17. setPedAnimation(element/ped Player) --stops the animation (ie sets to none)
  18. Wrong - first parameter of onPlayerWasted is the totalAmmo (int) - Thats why line 8 says it gets an integer '1' instead of the attacker. Line 3: Change function ( attacker ) to function ( ammo, attacker )
  19. Addlibs

    [Help] db

    If you're talking about SQLite dbQuery, and the ID of the row: viewtopic.php?f=91&t=78293
  20. Addlibs

    Doogs

    onVehicleEnter warpPedIntoVehcle onVehicleExit removePedFromVehicle
  21. Addlibs

    Doogs

    2 ways: 1.) Edit slothbot to use a table of player elements as 'friendlies' 2.) Make an empty team and set yourself to it, then spawn a dog - it should be a part of the team too.
  22. Have you added these files into the meta.xml? <file src="mods/infernus.txd" download="false" /> <file src="mods/infernus.dff" download="false" />
  23. Wrong assumption that the 1st parameter of 'onPlayerWasted' is 'attacker'; where infact it is the totalAmmo (int).
  24. addEventHandler("onPlayerWasted", root, function(ammo,attacker,attackerweapon)
×
×
  • Create New...