Jump to content

Galactix

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Galactix

  1. I can't help, sorry On a more serious note, just try to wait for someone experienced to see your topic and actually give you a hint or a solution to your problem
  2. I think the error is because you're using player both in your targetself variable and if statement. Try to change the if part to Something like if targetself == source. If you just use player like you did then it will do it for ALL the players targeted and it will Always hide the laser.
  3. Could you explain what you're trying to do and what doesn't work exactly with what you did?
  4. Your hasObjectPermission is set to false. By default an admin has access to the ban player permission and it is what causes the script to fail to work
  5. Change source to Drzika[source]
  6. Just use this https://wiki.multitheftauto.com/wiki/SetPlayerStat for all weapons( you could probably gain time with a table or something containing all the IDs) and add an handler « onPlayerSpawn »
  7. With getPlayerIdle time you can make a if statement that would trigger the image to show after a certain idle time by the player
  8. https://wiki.multitheftauto.com/wiki/GetPlayerIdleTime
  9. From what the wiki says, the function is client side only, so you would probably need to use a handler with onVehicleEnter.
  10. addCommandHandler('setskin',function(source,_,player,skinid) local find = findPlayer( player ) if find then local playerAccount = getPlayerAccount(source) local accName = getAccountName ( playerAccount ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementModel ( find, skinid ) outputChatBox("[Pirate-Gaming]Your skin was changed to "..skinid.." by the admin "..accName.."!", find) else outputChatBox("You are not allowed to use this command!", source, 255,0,0) end else outputChatBox("Player not found!", source, 255,0,0) end end)
  11. If you write /setskin MRThinker 1 it would work
  12. If you provide a player argument then the findPlayer wouldn’t output an error unless you didn’t put any or if the player isn’t online
  13. You need to do /setskin player skinid
  14. I already solved that differently but thanks anyways.
  15. You were right; I actually got it working, thanks so much
  16. Now my getElementData just outputs Bad argument, expected element got nil when I write
  17. Hello, I have the Following issue: I tried to set a variable to a getLocalPlayer but it just keeps returning nil value, why? My script is clientside so this is not the problem local player = getLocalPlayer ( )
  18. Go in private messages.
  19. function goToBeach() setElementPosition(localPlayer, 343.20026, -1780.60388, 5.22299) end addCommandHandler("gotobeach", goToBeach)
  20. function goToBeach() setElementPosition(source, 343.20026, -1780.60388, 5.22299) end addCommandHandler("gotobeach", goToBeach) Don't forget to add a Thanks reaction if it helped
  21. function pdEnter() local pdMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) -- set coordinates to be in front of the Police Departement setElementInterior(source, 5, 322.72, 306.43, 999.15 end addEventHandler( "onMarkerHit", pdMarker, pdEnter ) Don't forget the thanks reaction if it helped
  22. The script works perfectly for me. You have to do /setskin (name) (skin id)
  23. I meant reaction but that’s ok ^^
×
×
  • Create New...