Jump to content

JeViCo

Members
  • Posts

    605
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JeViCo

  1. when you teleport inside, you instantly hit another marker which teleports you back. You can teleport a player a little bit forward OR make a little delay between marker hits using set/getElementData @Sorata_Kanda
  2. I had type "all" type in dxCreateShader. I changed it to "ped" and it works! Thanks dude, you're awesome! Okay, we will wait for camera then ^-^
  3. i'm sorry but i'm not so stupid as you think. I asked for simple player animations - not all of them
  4. Hello everyone! I can't find names of player animations such as walking, running, idle, crouching - all player controls in general
  5. solved. I added my function at the end of bone_attach function (pre-render event). Bone_attach had loop so it didn't keep up after rotation function. Thanks anyway for suggestions
  6. Hello everyone! i use this code to change player's rotation: function updateCamera() x,y,z,tx,ty,tz = getCameraMatrix() newangle = (( 360 - math.deg ( math.atan2 ( ( x - tx ), ( y - ty ) ) ) ) % 360)-180 setElementRotation( localPlayer,0,0, -newangle ) end addEventHandler ( "onClientPreRender", getRootElement(), updateCamera ) also i use bone_attach resource to attach the object to a player. When a player rotates - object rotates too but in opposite direction and i don't know why. How can i fix it?
  7. i know that my model has texture name 'truth' (whole ped) but it doesn't work with custom ones
  8. Hello everyone! When i create object close to player's camera it disappears. How can i fix it? How can i make it like gta singleplayer one?
  9. i tried to use engineApplyShaderToWorldTexture function but it doesn't work for custom ped models for some reason I hope MTA team'll add this function some day ^-^
  10. Hello guys! 1. We can use/replace world textures,car textures, but what about peds? Why we can't still use separate textures to test out our abilities? 2. New camera functions - aiming! There a lot of topics with setCameraMatrix problem related to weapon aiming. I also tried that and got the same result. What about SetPedAimTarget and parent functions but for player?
  11. может кто-то и переписывал бы, но у меня появилась бы одна таблица от силы. Тем более я никому не настаивал использовать свой способ. Он поможет большинству игроков, которые мало разбираются в скриптах, а остальные всегда могут отредактировать код под себя
  12. JeViCo

    Help please

    wtf why so difficult? function renderCountDown (text) if not isTimer(offRender) then offRender = setTimer(function() removeEventHandler("onClientRender",getRootElement(),renderCountDown) -- remove render after 3 seconds return end,3000,1) end dxDrawText("1", (screenW * 0.1596) + 1, (screenH * 0.2839) + 1, (screenW * 0.8404) + 1, (screenH * 0.4297) + 1, tocolor(0, 0, 0, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("1", screenW * 0.1596, screenH * 0.2839, screenW * 0.8404, screenH * 0.4297, tocolor(255, 255, 255, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) end addEventHandler("onClientRender",getRootElement(),renderCountDown) -- add render OR function renderCountDown (text) if not startTick then startTick = getTickCount() end if getTickCount() - startTick > 3000 then -- 3000ms = 3s removeEventHandler("onClientRender",getRootElement(),renderCountDown) -- remove render startTick = nil return end dxDrawText("1", (screenW * 0.1596) + 1, (screenH * 0.2839) + 1, (screenW * 0.8404) + 1, (screenH * 0.4297) + 1, tocolor(0, 0, 0, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("1", screenW * 0.1596, screenH * 0.2839, screenW * 0.8404, screenH * 0.4297, tocolor(255, 255, 255, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) end addEventHandler("onClientRender",getRootElement(),renderCountDown) -- add render I didn't test both @Snakegold
  13. 1. You created binds on commands that don't exist. 2. this part of code won't work because 1 end missing. function setVehicleComponentPosition( veh ) if thePlayer press "p" setVehicleComponentPosition (theVeh, "movspoiler_25.0_3000", -0,003, -1,99, 0,48, 0) end 3. Name of this function is setVehicleComponentPosition so you can't manage vehicle components 4. This function will instantly change position of component. You need setTimer function on onClientRender event 5. Your vehicle must have part called movspoiler_25.0_3000 (use zmodeller or other software to find/create it) @nagymark686
  14. Понятия не имею кто вы и к чему это было написано, но мне как-то всёравно. Это уже никак не относится к топику
  15. sweet. That helps me with other scripts too. Thanks you
  16. Hello everyone! I have a list of numbers from 1 to 100 (ids of npcs). Player take a quest to kill one. How can i avoid the quest where 2 and more players have to kill the same npc? How can i get unused npc's id?
  17. i tried that. I also used onClientPreRender - same. i've already maden that system. vehicleComponentRotation automatically changes after leaving the car. Problem solved with onClientVehicleStartExit + onClientVehicleEnter + setElementData + some calculations
  18. Hello! Could you add something like css border-radius property? It'll be awesome having rounded buttons, window, gridlist corners
  19. You should remove this function joinHan() fadeCamera(source, true) showCursor(source, true) triggerClientEvent("pJoin", source ) end addEventHandler("onPlayerJoin", getRootElement(), joinHan) function trig() triggerClientEvent("pCreate", root) end addEventHandler("onResourceStart", getRootElement(), trig) and paste this (client-side) addEventHandler("onClientResourceStart",resourceRoot,function() fadeCamera(true) showCursor(true) --maybe some setCameraMatrix stuff right here create() end) @Unkovic
  20. if you use default scoreboard, look for this (dxscoreboard_client.lua) local playerName = getPlayerName( player ) and replace it with this if getElementData(player,"player:HiddenInScoreBoard") then playerName = "*hidden*" else local playerName = getPlayerName( player ) end Now you can add players by serial server-side (paste a code below in dxscoreboard_shared.lua) local hiddenSerials = { ["blablayour1000serial"] = true, ["anotherserial"] = true, } addEventHandler("onPlayerLogin",getRootElement(),function() local serial = getPlayerSerial(source) if hiddenSerials[serial] then setElementData(source,"player:HiddenInScoreBoard",true) end end) @Legend<3
  21. when i use setAnalogControlState it doesn't help at all
×
×
  • Create New...