Beiträge von Dredar

    Lua
    function set(player)
    	if getPedOccupiedVehicle ( player ) then
    		local veh = getPedOccupiedVehicle ( player )
    		local handling = getVehicleHandling ( veh )
    		local data = handlingTable["maxVelocity"]
    		setVehicleHandling( veh, "maxVelocity", data+100)
    		outputChatBox("Deine Velocity stieg um 100!", player, 0, 255, 0)
    	end
    end
    addCommandHandler("velocity", set)

    [10:54:21] ERROR: handling\handling.lua:5: attempt to index global 'handlingTable' (a nil value)

    Lua
    function set(player)
    	if getPedOccupiedVehicle ( player ) then
    		local handling = getVehicleHandling ( veh )
    		local data = handlingTable["maxVelocity"]
    		local veh = getPedOccupiedVehicle ( player )
    		setVehicleHandling( veh, "maxVelocity", data+100)
    		outputChatBox("Deine Velocity stieg um 100!", player, 0, 255, 0)
    	end
    end
    addCommandHandler("velocity", set)

    ging irg wie nicht

    Errors:
    [10:48:41] WARNING: handling\handling.lua:3: Bad argument @ 'getVehicleHandling' [Expected vehicle at argument 1, got nil]
    [10:48:41] ERROR: handling\handling.lua:4: attempt to index global 'handlingTable' (a nil value)

    also ich möchte wissen wie man einem Auto Handlings einfügt aber so:

    Lua
    setVehicleHandling(veh, "maxVelocity", dieseZahl+100)


    aber das Problem ist ich weiß nicht wie man dieseZahl erfragt.

    was wenn ich es so machen will:

    also zb. man färt in eine garage und dann wird erstmal das gecheckt:
    diese zahl und dann wird diese zahl +0.2 oder +100 genommen
    so meine ich das

    if getVehicleHandling ( veh, "maxVelocity") == 100 then
    würde das funktionieren also es würde doch dann abgecheckt werden wv velocity er haben muss oder?