Jump to content

Stroth

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Stroth

  1. Fixed.

    Race > Settings > Race respawn after spectate

    Changed 'false' to 'true' (like it should be in default)

  2. Hi, i've a little problem with respawn,

    Now, players respawn on the same location where they pressed B to spectate, so if a player make a fail, press B to spectate and press B again to play they will make the fail over and over again.

    I want it like this: it would be good to respawn players on the last checkpoint they hit, like it is in classic race servers.

     

    Someone can help me with this?
     

     

  3. 15 hours ago, myonlake said:

    Well, how do you define someone a spectator? Element data perhaps? A variable? You can simply just add that to the not isPedInVehicle check and make it return nothing when they are a spectator.

     

    Now I have this:

     

    client side:
    
    function fuelRefill()
    	if not isPedInVehicle(localPlayer) then return end
    	local state = triggerServerEvent("getPlayerState", resourceRoot, localPlayer)
    	if state ~= "alive" then return end
    	for i,marker in ipairs(refill_stations) do
    		local p_veh = getPedOccupiedVehicle(localPlayer)
    		if isElementWithinMarker(p_veh, marker) and fuel < 100 thenfuel = fuel + r_rate end
    	end
    end
    
    
    server side:
    
    function getPlayerState(player)
    	local state = getElementData(player, "player state")
    	if state then
    		return state
    	end
    	return false
    end
    addEvent("getPlayerState", true)
    addEventHandler("getPlayerState", resourceRoot, getPlayerState)
    
    
    meta:
    
    <export function="getPlayerState" type="server"/>

    Line 3:     local state = triggerServerEvent("getPlayerState", resourceRoot, localPlayer)

    Line 3 isn't working yet, how can I make it working?

  4. Hello, I have a little problem with a fuel system wich I can't fix.

    In my map I have a location where players can refill their tank.

    If player-1 ran out of fuel (or have less fuel), he can spectate. But If he's spectating a player (for example player-2) at the fuel station, and player-2 is refilling his tank, player-1 also gets fuel (because he's spectating a player which is refilling his tank).

     

    How can I stop spectators refill their tank if they spectate a player which is refilling?

     

    My code:

    function fuelRefill()
        if not isPedInVehicle(localPlayer) then return end
        for i,marker in ipairs(refill_stations) do
            local p_veh = getPedOccupiedVehicle(localPlayer)
            if isElementWithinMarker(p_veh, marker) and fuel < 100 then
                fuel = fuel + r_rate
            end
        end
    end

     

  5. I moved the slider to right.

    There was 'editor_dump' and 'editor_test'.

    Now I remember that some guy in my team (Ryuzaki a.k.a. animal owner) used the editor (in the server) to change something on this map.

    So, that causes the problem.

     

    The editor_dump and editor_test folders were in the resources folder and I deleted it.

    Now it works!

    Big thanks to you Megas, for helping me! You are invited for the next AFE Street Outlaws Edition xD

  6. Refreshing maps and list didn't work.

    So I deleted all the maps:

    Still 2 maps left.

    2ia3def.png

    I searched for this map in all the folders:

    2wn94ja.png

    There are 3 files or folders in the 'resource-cache' map.

    If I delete all the files and folders in the resource-cache map and restart the server the files will come back and the maplist will show the same.

    So the problem is still not fixed.

×
×
  • Create New...