
papam77
Members-
Posts
517 -
Joined
-
Last visited
Everything posted by papam77
-
I need if player has car with any other color out of white to automaticaly change it to white if is other color.
-
It has errors http://www.upload.ee/image/3474033/errprs.png
-
function car ( vehicle ) local barva = getVehicleColor ( vehicle ) local r, g, b = 255, 255, 255 if not barva == r and barva == g and barva == b then setVehicleColor ( localVehicle, 255 ,255 ,255 ) end end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), car ) Why this doesn't set car color to white when is any other color than white?
-
I think the GIF is better, because you don't need to use timers and timers are sometimes laging if is too much timers on the server.
-
Yes, thank you And this is for someone else function updatePickups() local setRotationSpeed = 1000 -- in ms local angle = math.fmod((getTickCount() - g_PickupStartTick) * 360 / setRotationSpeed, 360) local g_Pickups = g_Pickups local pickup, x, y, cX, cY, cZ, pickX, pickY, pickZ for colshape,elem in pairs(g_VisiblePickups) do pickup = g_Pickups[colshape] if pickup.load then setElementRotation(elem, 0, 0, angle) if pickup.label then cX, cY, cZ = getCameraMatrix() pickX, pickY, pickZ = unpack(pickup.position) x, y = getScreenFromWorldPosition(pickX, pickY, pickZ + 2.85, 0.08 ) local distanceToPickup = getDistanceBetweenPoints3D(cX, cY, cZ, pickX, pickY, pickZ) if distanceToPickup > 80 then pickup.labelInRange = false pickup.label:visible(false) elseif x then if distanceToPickup < 60 then if isLineOfSightClear(cX, cY, cZ, pickX, pickY, pickZ, true, false, false, true, false) then if not pickup.labelInRange then if pickup.anim then pickup.anim:remove() end pickup.anim = Animation.createAndPlay( pickup.label, Animation.presets.dxTextFadeIn(500) ) pickup.labelInRange = true pickup.labelVisible = true end if not pickup.labelVisible then pickup.label:color(255, 255, 255, 255) end pickup.label:visible(true) else pickup.label:color(255, 255, 255, 0) pickup.labelVisible = false pickup.label:visible(false) end else if pickup.labelInRange then if pickup.anim then pickup.anim:remove() end pickup.anim = Animation.createAndPlay( pickup.label, Animation.presets.dxTextFadeOut(1000) ) pickup.labelInRange = false pickup.labelVisible = false pickup.label:visible(true) end end local scale = (60/distanceToPickup)*0.7 pickup.label:scale(scale) pickup.label:position(x, y, false) else pickup.label:color(255, 255, 255, 0) pickup.labelVisible = false pickup.label:visible(false) end if Spectate.fadedout then pickup.label:visible(false) -- Hide pickup labels when screen is black end end else if pickup.label then pickup.label:visible(false) if pickup.labelInRange then pickup.label:color(255, 255, 255, 0) pickup.labelInRange = false end end end end end addEventHandler('onClientRender', g_Root, updatePickups)
-
No, it was a default pickup, but faster rotations.
-
Hello, I've saw anywhere faster pickups rotation, how can do that please?
-
Why createVehicle? I think he wants it for Freeroam or something like that, so I guess he already has vehicles in map. And if is in the map vehicle called Turismo, it will be flying. Or not?
-
Serverside: function TEAM () theTeam2 = createTeam ( "HERE PUT YOUR TEAM NAME", 0, 0, 0 ) end addEventHandler("onResourceStart", resourceRoot, TEAM) function SETACL() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("ANY ACL GROUP")) then outputChatBox ( " You are in ACL " ) end end addEventHandler("onPlayerLogin",getRootElement(),SETACL) addEventHandler("onPlayerSpawn",getRootElement(),SETACL) Don't forget to edit aclGetGroup
-
function FLY () local car = getVehicleName() if ( car == Turismo ) then setWorldSpecialPropertyEnabled ( "aircars", true ) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), FLY ) Now it is your turn
-
Yeah, it works, thank you man
-
Still i get this message at floor 3
-
I have try already, but i still see the message at floor 3 and at floor 1.
-
Yes and i wanna see it only in one floor.
-
No, i am talking about, that if i am enter to marker in floor 1 i see this message local msg = ..... It is correct, but i see same message at Floor 3, but in floor 3 isn't marker. Why i see it ?
-
At floor 1 http://www.upload.ee/image/3472214/F1.png At floor 3 http://www.upload.ee/image/3472216/F3.png I am hitting to this marker at floor 3 and debugscript is empty. function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local px, py, pz, type, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker ( px, py, pz, type, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) Current code.
-
function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker ( px, py, pz, typ, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) function MGMA () if ( MGMARKER ) then local msg = "#ff9900Christina:#ffffff If you want to open a Multi-Gamemode, press F." outputChatBox (msg, source, 255,255,255, true) end end addEventHandler("onPlayerMarkerHit",getRootElement(),MGMA) Why is marker as invisible hiting to Z:1025 ? Marker is Z: 1008.7 and it is Arrow, but here is problem if i am on same place but on Z 1025 i see still Message from marker, but why? I don't see a marker on this Z position... Where is problem?
-
Hello guys, how can make text above the ped?
-
Ah now it works, ty
-
setPedAnimation is bad argument, so doesn't work. And ped isn't created.
-
Now: http://www.upload.ee/image/3470948/wronghmm.png function eag () palmtxd = engineLoadTXD("[eagle]/EagleSystem/Teams/EAG/ac.txd") engineImportTXD(palmtxd, 165 ) local palmdff = engineLoadDFF('[eagle]/EagleSystem/Teams/EAG/ac.dff', 0) engineReplaceModel(palmdff, 165) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), eag ) And nothing. How can be path wrong?