1LoL1
-
Posts
944 -
Joined
-
Last visited
Posts posted by 1LoL1
-
-
Try to put that outputDebugString at line 77.
outputDebugString ( tostring (objx).."-"..tostring(objy).."-"..tostring(objz).." | "..tostring(offrx).."-"..tostring(offry).."-"..tostring(offrz) )
Check your debugscript when you get the error, which output comes before the errors?
No i don't have there errors..
ID(0): Same warnings
Other ID: Only green INFO: objx, objy, objz, offrx, offr, offrz
-
Hi, can anyone help me with this 2x warning? i really don't know where is problem..
WARNING: Bad argument @ 'setElementRotation' [Expected number, got NaN] Line: 78
WARNING: Bad argument @ 'setElementPosition' [Expected number, got NaN] Line: 79
When i want attach weapon on skin ID(0) i get 2x warning but other's skins attach work normally.
ID(0):
Other ID:
function sendReadyMessage() triggerServerEvent("boneAttach_requestAttachmentData",root) end addEventHandler("onClientResourceStart",resourceRoot,sendReadyMessage) function getAttachmentData(ped,bone,x,y,z,rx,ry,rz) for element,att_ped in pairs(ped) do setElementCollisionsEnabled(element,false) attached_ped[element] = att_ped attached_bone[element] = bone[element] attached_x[element] = x[element] attached_y[element] = y[element] attached_z[element] = z[element] attached_rx[element] = rx[element] attached_ry[element] = ry[element] attached_rz[element] = rz[element] end end addEvent("boneAttach_sendAttachmentData",true) addEventHandler("boneAttach_sendAttachmentData",root,getAttachmentData) function initAttach() addEvent("boneAttach_attach",true) addEvent("boneAttach_detach",true) addEventHandler("boneAttach_attach",root,attachElementToBone) addEventHandler("boneAttach_detach",root,detachElementFromBone) end addEventHandler("onClientResourceStart",resourceRoot,initAttach) bone_0,bone_t,bone_f = {},{},{} bone_0[1],bone_t[1],bone_f[1] = 5,nil,6 --head bone_0[2],bone_t[2],bone_f[2] = 4,5,8 --neck bone_0[3],bone_t[3],bone_f[3] = 3,nil,31 --spine bone_0[4],bone_t[4],bone_f[4] = 1,2,3 --pelvis bone_0[5],bone_t[5],bone_f[5] = 4,32,5 --left clavicle bone_0[6],bone_t[6],bone_f[6] = 4,22,5 --right clavicle bone_0[7],bone_t[7],bone_f[7] = 32,33,34 --left shoulder bone_0[8],bone_t[8],bone_f[8] = 22,23,24 --right shoulder bone_0[9],bone_t[9],bone_f[9] = 33,34,32 --left elbow bone_0[10],bone_t[10],bone_f[10] = 23,24,22 --right elbow bone_0[11],bone_t[11],bone_f[11] = 34,35,36 --left hand bone_0[12],bone_t[12],bone_f[12] = 24,25,26 --right hand bone_0[13],bone_t[13],bone_f[13] = 41,42,43 --left hip bone_0[14],bone_t[14],bone_f[14] = 51,52,53 --right hip bone_0[15],bone_t[15],bone_f[15] = 42,43,44 --left knee bone_0[16],bone_t[16],bone_f[16] = 52,53,54 --right knee bone_0[17],bone_t[17],bone_f[17] = 43,42,44 --left ankle bone_0[18],bone_t[18],bone_f[18] = 53,52,54 --right angle bone_0[19],bone_t[19],bone_f[19] = 44,43,42 --left foot bone_0[20],bone_t[20],bone_f[20] = 54,53,52 --right foot function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") if ( not tonumber ( tostring ( objx ) ) or not tonumber ( tostring ( objy ) ) or not tonumber ( tostring ( objz ) ) ) then return end if ( not tonumber ( tostring ( offrx ) ) or not tonumber ( tostring ( offry ) ) or not tonumber ( tostring(offrz ) ) ) then return end else setElementPosition(element,getElementPosition(ped)) end end end addEventHandler("onClientPreRender", getRootElement(), putAttachedElementsOnBones)
-
This will not work it's client-side command.
-
Dobrý den, mám takový problém nějaký polský server fake a snaží se nám ukradnout clan tag, jméno klanu je uplně stejné jako naše - KFC, [KFC] Gaming potřeboval bych poradit co mám udělat.. protože už mi jednou takhle ukradli clan tag uG// a po druhé bych nechtěl aby mi znovu ukradli klan.. my hrajem jenom herní mód RACE.. DM/MAPPING/SHOOTER.
Nemuzes udelat nic.. na MTA muzes mit clan tag jaky chces takze nikdo s tim nic neudela.
-
-
Wrong section.
-
heeeeelp please
Amount = { }; Amount.RED = { 255, 0, 0 }; Amount.BLUE = { 1, 1, 1 }; Amount.PINK = { 2, 2, 2 }; Amount.BLACK = { 0, 0, 0 }; function clr (player,command,color) local vehicle = getPedOccupiedVehicle(player) if color and vehicle then if ( not Amount [ tostring ( color ):upper ( ) ] ) then return false; end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then local r, g, b = unpack ( Amount [ tostring ( color ):upper() ] ); setVehicleColor(vehicle, r, g, b ); else outputChatBox("text", player, 255, 255, 255, true) end end end addCommandHandler("color", clr)
-
Why are you posting here if you got nothing to release/publicise?
[sHOW]Multiworld with lobby
-
CLIENT ---
addEventHandler("OnClientMarkerLeave", getRootElement(), function() if isElement(source) and getElementData(source, "tentMark") then local tent = getElementData(source, "tent") local tentCol = getElementData(source, "tentCol") if isElement(tent) then destroyElement(tentCol) destroyElement(tent) end destroyElement(source) setElementData(localPlayer, "Tent", getElementData(localPlayer, "Tent") + 1,true) triggerServerEvent ( "UnBindSetTent", resourceRoot ) end end)
SERVER ----
function UnBindSetTent() unbindKey(client,"enter", "down", setTent) end addEvent( "unBindSetTent", true ) addEventHandler( "unBindSetTent", resourceRoot, UnBindSetTent)
Untested.
But i have marker created in server-side..
MaRkeR = createMarker(...)
Me = i leave marker(MaRkeR) so marker will be deleted
Others players = others players leave marker(MaRkeR) so nothing only leave.
Now it's i'am in marker my friend join too but when he leave the marker my marker is deleted.. i need this:
i'am in marker my friend join too then my friend leave the marker and marker will not deleted.. only when i leave..
-
Please post full script
Don't need full script.. i tested with onClientMarkerLeave and not work..
-
destroyElement works in both sides.
I know omg.. i need know if this is possible what i said.
-
Dont use destroyElement(mark) because the marker will be deleted
It is like when you delete a folder
The folder will not exist until you recreate it
(The mark will be deleted until you declare it again )
U can make the marker invisible setting its alpha to 0
Sorry but i can't post the correct code because i am on my phone
Hope my post helped you
But i need destroyElement(mark) i need only cancel if other players leave my marker..
Me = i leave marker so marker will be deleted
Others players = others players leave marker so nothing only leave.
if this is possible.
-
Hello, i have problem in my script when any player joined in my marker and leave then marker + tent is destroyed and this i don't want.. i need only me when i leave so then will marker + tent destroyed. Can anyone help me please?
addEventHandler("onPlayerMarkerLeave", getRootElement(), function(mark) if isElement(mark) and getElementData(mark, "tentMark") then local tent = getElementData(mark, "tent") local tentCol = getElementData(mark, "tentCol") if isElement(tent) then destroyElement(tentCol) destroyElement(tent) end destroyElement(mark) setElementData(source, "Tent", getElementData(source, "Tent") + 1) unbindKey(source, "enter", "down", setTent) end end)
-
If you have decompiled version then survivorClient.lua
-
survivorsystem.lua
function: backPackBack
-
local font = guiCreateFont(":resourcename/fonts/something.ttf")
-
They use onClientPreRender to attach a corona marker to the missiles onClientProjectileCreation, I'm 99% positive
Idk how to code dude i remember i had this script can you help me with it ??
Send me your skype in PM. I have this script.
-
function Wasted() skin = getPedSkin(source) setElementModel(source, skin) end addEventHandler("OnPlayerWasted", root, Wasted)
it's
addEventHandler("onPlayerWasted", root, Wasted)
-
setElementFrozen
set it to true, then with a 3 seconden setTimer set it back to false
function frozeMarker (thePlayer, freezeTime) local players = getElementsByType ( "player" ) setElementFrozen (players, true) setTimer ( setElementFrozen, 3000, 1, players, false) end addEventHandler ("onMarkerHit", root, frozeMarker)
This is not working to ;(
Try this:
function frozeMarker () for i, players in ipairs(getElementsByType("player")) setElementFrozen (players, true) setTimer(setElementFrozen, 3000, 1, players, false) end addEventHandler ("onMarkerHit", getRootElement(), frozeMarker)
-
-
-
H = PUT YOUR HIGHT HERE W = PUT YOUR WIDTH HERE local height, width = guiGetScreenSize() local adjustH = (1/H)*height local adjustW = (1/W)*width dxDrawRectangle(1555*adjustH , 1003*adjustW , lenght*adjustH , 16*adjustW , tocolor(rr,gg,bb,alpha), false) dxDrawRectangle(1555*adjustH , 1003*adjustW, 320*adjustH, 16*adjustW, tocolor(0, 0, 0, 120), false)
Idk but really this don't work.
H = 800 W = 600 local height, width = guiGetScreenSize() local x = (1/H)*height local y = (1/W)*width wnds = guiCreateStaticImage(x * 0.800, y * 0.250, 0.27, 0.18, "image.png", true)
in 800x600 work normally but in 1366x768 no
-
Ah is true, sry.
local unemployed = createTeam("Unemployed", 255, 255, 255) function unemploy(source) setPlayerTeam(source, unemployed) end addCommandHandler('leavejob', unemploy)
He mean this:
function unemploy (source) setPlayerTeam(source, getTeamFromName("Unemployed")) end addCommandHandler("leavejob, unemploy)
-
2x Warning
in Scripting
Posted
No.. Now it's the same what was.