Jump to content

[HELP] Carshop & Private car menu for creation & MORE


Recommended Posts

Hello dear MTA:SA Staff,

I have some questions, sorry but they are a lot of, but my hosting is under construction and everything turned upside-down, I need your help.

First, I'm using sparrow_vehowner and I don't like it - I can't delete vehicles (I need to edit the registry file, because the button in the menu isn't working), if the vehicle is in the river it can't be respawned or if it get wreck I need to restart the script. I was searching for car shop with for example F2 panel where the car owner can freeze and respawn his vehicle near him or on a specific place. And admin panel for spawning free fraction vehicles like police. I saw some mods, but they were not working. :)

Second, can you give me a car wreck fix mod for ACL Mechanic who can "Spray" the vehicles and fix the wreck or some command when they are near the wreck vehicle.

Third, I'm using team saver, but it has bug - If I remove a player from a team when he reconnect he is again in this team.

Code:

--Team save
function onPlayQuit ( )
      local playeraccount = getPlayerAccount ( source )
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in
	      local myTeam = getPlayerTeam ( source )
			if (myTeam) then
			
            local currentTeam = getTeamName ( myTeam ) 
            setAccountData ( playeraccount, "TeamLog", currentTeam ) -- save it in his account
      end
end
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayQuit )


--Team load
function onPlayLogin (_, playeraccount )
      if ( playeraccount ) then
            local LoadTeam = getAccountData ( playeraccount, "TeamLog" )

            if ( LoadTeam ) then
			      teamLoad = getTeamFromName ( LoadTeam ) 
                  setPlayerTeam ( source, teamLoad )
            end
      end
end
addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayLogin )

Fourth:

How to save the teams and played time (time-rp mod on TAB) when I restart the server? I'm using liltoady's admin panel there is team menu.

Mod: https://drive.google.com/file/d/1F4HKs3G7ykj2oZJzzCa7Wc-PRPdIUWfI/view

Fifth: 

How can I add interval by freezing the vehicles (like 5 minutes after leaving them), when I exit of a helicopter in the air it stay there. :<

-- CLIENT SIDE SCRIPT !


-- freeze unused vehicles
addEventHandler("onClientElementStreamIn", root, function()
	if getElementType(source) == "vehicle" and not getVehicleController(source) then
		setElementFrozen(source, true)
	end
end)

-- unfreeze vehicle on enter
addEventHandler("onVehicleEnter", root, function(player, seat)
	if seat == 0 then
		setElementFrozen(source, false)
	end
end)

-- freeze vehicles on exit
addEventHandler("onVehicleExit", root, function(player, seat)
	if seat == 0 then
		setElementFrozen(source, true)
	end
end)

 

Btw, how to mute from Voice chat?

 

And last, how to edit cars and add them only Bulgarian license plate and is it forbidden?

Thank you guys,

Dixiklo 

Edited by DreaM40BG
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...