Jump to content

[DemoN]

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by [DemoN]

  1. No errors, no warnings. Markers were destroyed but i couldn't get an m4
  2. Line 12: bad argument #2 to 'remove' (number expected, got userdata) Now It doesn't remove markers..
  3. It destroys markers but doesn't give me m4
  4. Maybe something like this? ( There may be errors, I'm not good at scripting Just an idea ) function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) x, y, z = getElementPosition ( source ) health = createPickup ( x, y, z, 0, 100) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) function destroyPickup destroyElement(health) end addEventHandler("onPickupHit", health, destroyPickup)
  5. Wait. my name in the list No problem I can always help you and This resource looks awesome but What did i do? (Really. I don't remember)
  6. You should calculate angles to attach an element to player bones. https://wiki.multitheftauto.com/wiki/GetPedBonePosition ^ You can find bone IDs with that link.
  7. [DemoN]

    censorship help!

    Change line 415 in freeroam/fr_server.lua addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local account = getPlayerAccount(source) local r, g, b = getPlayerNametagColor(source) local name = getPlayerName(source) local msg = msg:gsub('#%x%x%x%x%x%x', '') if isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Admin' ) ) then outputChatBox( "#FF0000[Admin]" .. name .. '#FFFFFF: #FFFFFF' .. msg, g_Root, r, g, b, true) elseif isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Moderator' ) ) then outputChatBox( "#FF8000[Moderator]" .. name .. '#FFFFFF: #FFFFFF' .. msg, g_Root, r, g, b, true) elseif isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Member' ) ) then outputChatBox( "#00FF00[Member]" .. name .. '#FFFFFF: #FFFFFF' .. msg, g_Root, r, g, b, true) else outputChatBox( "#FFFF00[Guest]" .. name .. '#FFFFFF: #FFFFFF' .. msg, g_Root, r, g, b, true) end end end )
  8. x,y,z,tx,ty,tz = getCameraMatrix() myAngle = (( 360 - math.deg ( math.atan2 ( ( x - tx ), ( y - ty ) ) ) ) % 360)-180 setPedRotation( getLocalPlayer(), myAngle ) not tested...
  9. That works fine for me: function nametagColorChange ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "nametagcolor", nametagColorChange ) ^ Example from Wiki
  10. Check those resources: https://community.multitheftauto.com/index.php?p=resources&s=details&id=32 https://community.multitheftauto.com/index.php?p=resources&s=details&id=910 or you can use createProjectile and this link may help you: https://wiki.multitheftauto.com/wiki/CreateProjectile
  11. [DemoN]

    No-swear...

    Wow. Thanks for the tip. I'll use it
  12. [DemoN]

    No-swear...

    Woah! Thank you Cadu12 (where have you found this dirty things? )
  13. [DemoN]

    No-swear...

    Oh Thank you guys.
  14. [DemoN]

    No-swear...

    Hello. I'm trying to make a script which doesn't allow you to swear... but it says: lua4 ')' expected near ' "#FFFFFFWho?" ' and it's not cancelling when I type gay (Is there any function to make it GaY or gAy ??) (and I need to add a lot of 'elseif'. How can i make a table?) Here is the code: function sansur(message,type) if (string.find(message,"hacker")) then outputChatBox("#00FF00Jonathan :" "#FFFFFFWho?" ) elseif (string.find(message,"hax")) then outputChatBox("#00FF00Jonathan :" "#FFFFFFWho?" ) elseif (string.find(message,"hack"))then outputChatBox( "#00FF00Jonathan :" "#FFFFFFWho?" ) end end addEventHandler ("onPlayerChat",getRootElement(), sansur) function sansur2(message, type) if (string.find(message,"gay")) then cancelEvent() outputChatBox(getPlayerName(source).. ":" "#FF0000(dirty word)") outputChatBox( "#00FF00Jonathan :" "#FF0000Don't swear and don't talk about dirty things. That's not good.") end end addEventHandler("onPlayerChat", getRootElement(), sansur2) ( outputChatBox(getPlayerName(source).. ":" "#FF0000(dirty word)") <----- Here i wanted to turn gay into (dirty word) not all message. can someone help me? )
  15. Awesome script. I saw it in MTA 1.1 (The_GTA's server) good job dude
  16. Woah! Awesome script dude
  17. Thanks. but still dunno that: local myMarkers = { createMarker( 0, 0, 4, 'cylinder', 1, 255, 0, 0, 150 ), createMarker( 0, 2, 4, 'cylinder', 1, 255, 0, 0, 150 ), createMarker( 0, 4, 4, 'cylinder', 1, 255, 0, 0, 150 ), createMarker( 0, 6, 4, 'cylinder', 1, 255, 0, 0, 150 ), createMarker( 0, 8, 4, 'cylinder', 1, 255, 0, 0, 150 ) } function PlayerMarkerHit( markerHit, matchingDimension ) local player = source for k, marker in ipairs(myMarkers) do if marker == markerHit then destroyElement ( markerHit ) return end end giveWeapon ( player, 31 ) end addEventHandler( "onPlayerMarkerHit", root, PlayerMarkerHit )
  18. well... I've created something so silly and it says: bad argument @ attachElements function myTest() local x, y, z = getPedBonePosition(getLocalPlayer(), 6) local object = createObject(1369, 0, 0, 0) attachElements(object, source, x, y, z) end addCommandHandler("testing", myTest)
  19. Uhm.. ok but I don't know how to calculate it can you give an example? i don't care which bone or which object, just need a little example which i can understand easily
  20. It creates markers but when all markers are destroyed, it doesn't give me m4 Edit: Thanks for bone link Edit2 (about bones): Is there an easy way? It looks like very hard
  21. 1) I've created 5 markers (for now). When I hit them they'll be destroyed( i know how to do that) but when all markers are destroyed (random. not in order), I want to give m4 (id: 31) to player and dunno how to do that. Can someone help me? Here is the code: local myMarker = createMarker( 0, 0, 4, 'cylinder', 1, 255, 0, 0, 150 ) local myMarker2 = createMarker( 0, 2, 4, 'cylinder', 1, 255, 0, 0, 150 ) local myMarker3 = createMarker( 0, 4, 4, 'cylinder', 1, 255, 0, 0, 150 ) local myMarker4 = createMarker( 0, 6, 4, 'cylinder', 1, 255, 0, 0, 150 ) local myMarker5 = createMarker( 0, 8, 4, 'cylinder', 1, 255, 0, 0, 150 ) function MarkerHit( hitElement, matchingDimension ) destroyElement(myMarker) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) function MarkerHit2( hitElement, matchingDimension ) destroyElement(myMarker2) end addEventHandler( "onMarkerHit", myMarker2, MarkerHit2 ) function MarkerHit3( hitElement, matchingDimension ) destroyElement(myMarker3) end addEventHandler( "onMarkerHit", myMarker3, MarkerHit3 ) function MarkerHit4( hitElement, matchingDimension ) destroyElement(myMarker4) end addEventHandler( "onMarkerHit", myMarker4, MarkerHit4 ) function MarkerHit5( hitElement, matchingDimension ) destroyElement(myMarker5) end addEventHandler( "onMarkerHit", myMarker5, MarkerHit5 ) 2) Where can i find an example of attaching an object to player's bone?
  22. because you can use setElementAlpha on objects too. I tried it several times and it worked...
  23. [DemoN]

    FR Gui...

    Thank you Castillo. I've tried it on my Laptop and My Desktop (I don't have server ports because my laptop won't allow me to open ports. So I can test it with my computers ) and It's working
×
×
  • Create New...