
LiOneLMeSsIShoT
Members-
Posts
609 -
Joined
-
Last visited
Everything posted by LiOneLMeSsIShoT
-
I want this to Defin automatic...because if i Define then the window will work with one Resoultion..or what? -- define the X and Y positions of the window local X = 0.375 local Y = 0.375 -- define the width and height of the window local Width = 0.25 local Height = 0.25 And Actually still don't understand ..because that gui you gave me learns to make a gui to make login panel..i want a script to make the resolution automatic work fine.
-
Works Fine ..Thanks a lot.
-
In this script when i try to restart any resource...the camera Starts.. local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler ( ) if ( sm.moov == 1 ) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 sm.timer1 = setTimer ( removeCamHandler, time, 1 ) sm.timer2 = setTimer ( destroyElement, time, 1, sm.object1 ) sm.timer3 = setTimer ( destroyElement, time, 1, sm.object2 ) return true end addEventHandler ( "onClientResourceStart", root, function ( ) smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) end ) addEvent ( "stopCamera", true ) addEventHandler ( "stopCamera", root, function ( ) removeCamHandler ( ) if isElement ( sm.object1 ) then destroyElement ( sm.object1 ) end if isElement ( sm.object2 ) then destroyElement ( sm.object2 ) end if isTimer ( sm.timer1 ) then killTimer ( sm.timer1 ) end if isTimer ( sm.timer2 ) then killTimer ( sm.timer2 ) end if isTimer ( sm.timer3 ) then killTimer ( sm.timer3 ) end sm = { } end ) how to fix it?
-
hmm..how to use it? can you give me an example?
-
I've made gui windows in my server...and i got a problem with "Resolution"...because the Resoltion which i use it:1280 x 720: so the others don't see the guis with the correct Resolution..it makes problems on my server.. so there's someway to make the Resolution of Guis Automatic? or even when the player join set his Resolution to 1280 x 720? Please help guys. Thanks
-
for me not mistake..because anyone can to take a look before putting it..if he's not Copy/Past...and Thanks man !
-
ah...used Fade Camera then worked ... Thanks..
-
Yeah.....actually puted it after totalBags...then worked because i want to low the number before shows it..and Thanks a lot man..you helped me a lot here ...Big THANKS..and thanks to tapl too totalBags = ( totalBags - 1 ) triggerClientEvent ( root, "howManyBags", root, "BagNum", "There are now "..totalBags.." bags available around the city")
-
The screen Still BLACK when i join
-
hm..can you give me an example for that? and i want it to be trigged when player click on btn..not on pickup.so the work will be in the button and the script now local pbags = { {2028.2314453125, 648.09765625, 11.366704940796}, {2340.6474609375, 750.9208984375, 11.218271255493}, {1632.525390625, 1035.7626953125, 13.769004821777}, {1494.2626953125, 751.025390625, 29.161626815796}, {1454.25, 751.05859375, 32.736267089844}, {1533.3515625, 751.1181640625, 32.64266204834}, {1427.3037109375, 1462.958984375, 10.8203125} } local bags = { } local gotBag = { } local totalBags = #pbags addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, i in ipairs ( pbags ) do local baga = createPickup(i[1], i[2], i[3], 3, 1210 ) local bagb = createObject ( 1210, 0, 0, 0 ) addEventHandler ( "onPickupHit", baga, onPickupHit ) bags [ baga ] = bagb end end ) function onPickupHit ( player ) if ( not isPedInVehicle ( player ) and not isPedDead ( player ) and not gotBag [ player ] ) then exports.bone_attach:attachElementToBone ( bags [ source ], player, 12, 0, 0.1, 0.3, 0, 180, 0 ) gotBag [ player ] = bags [ source ] destroyElement ( source ) end end function onBtnClick ( ) if ( gotBag [ source ] ) then local money = math.random ( 1000, 2000 ) givePlayerMoney ( source, money ) destroyElement ( gotBag [ source ] ) triggerClientEvent ( source, "WarningText", source, "reward", "You have rewarded and got ".. money .. "$ from the dealer!! Good Job Pro!" ) outputChatBox ( "you have Rewarded and got ".. money .."$ from the dealer...You are PRO!! Good JOB!", source, 0, 255, 0, false ) triggerClientEvent ( source,"winSound", source ) gotBag [ source ] = nil totalBags = ( totalBags - 1 ) else triggerClientEvent ( source, "WarningText", source, "reward", "You have to get the briefcase of weapons First!" ) end end addEvent ( "reward", true ) addEventHandler ( "reward", root, onBtnClick ) function onPlayerQuit ( ) if ( gotBag [ source ] ) then destroyElement ( gotBag [ source ] ) local x, y, z = getElementPosition ( source ) local baga = createPickup ( x, y, z, 3, 1210 ) local bagb = createObject ( 1210, 0, 0, 0 ) addEventHandler ( "onPickupHit", baga, onPickupHit ) bags [ baga ] = bagb gotBag [ source ] = nil end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) function showBagNums () triggerClientEvent (source, "howManyBags", source, "BagNum", "There are now "..totalBags.." bags available around the city") end addEventHandler ("onPlayerLogin", getRootElement(), showBagNums) client: function bagNums (Tab,Text) if Tab == "BagNum" then guiSetText (BagsNums, Text) end end addEvent ("howManyBags", true) addEventHandler ("howManyBags", getRootElement(), bagNums) not the full client..but another another functions no need in this situation
-
yeah it shows 7 now...but when i tried to get the bag and click on the button..the number don't refresh...stands 7..so it need onClientRender? i guess...but i can't add it in server function ..so what should i do?
-
Actaully still see black when i join the full script: client: local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler ( ) if ( sm.moov == 1 ) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end addEvent ( "stopCamera", true ) addEventHandler ( "stopCamera", root, removeCamHandler ) function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end addEventHandler ("onClientResourceStart", root, function ( ) cams = smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) end ) server: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "stopCamera", source ) end ) ah...and when i start another script...the camera works !
-
Still..i'm only see black when player join.
-
My MIstake..sorry ..and Thanks and i've made this to stop the cams when player logins..but not works: client: function ( ) cams = smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) end ) function intro () if (cams) and (isElement(cams)) then destroyElement (cams) end end addEvent ("stopCams", true) addEventHandler ("stopCams", getRootElement(), intro) server: function intro () triggerClientEvent (source, "stopCams", source) end addEventHandler ("onPlayerLogin", getRootElement(), intro)
-
My MIstake..sorry ..and Thanks
-
Yeah ... Really nice...but after this i tried to show the bags numbers in label...but not works...please check : client: function bagNums (Tab,Text) if Tab == "BagNum" then guiSetText (BagsNums, Text) end end addEvent ("howManyBags", true) addEventHandler ("howManyBags", getRootElement(), bagNums) server: function showBagNums (source) triggerClientEvent (source, "howManyBags", source, "BagNum", "There are now "..totalBags.." bags available around the city") end addEventHandler ("onPlayerLogin", getRootElement(), showBagNums) I think the problem with the Event Handler?
-
ah...yes work when i do /camera....but i tried to add event handler ...not works ..":/ local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end addEventHandler ("onPlayerJoin", root, function ( ) smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) end )
-
what you mean with the code i use ?? i think all scripts which i use posted? and if you mean the last one...it's :- local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end addCommandHandler ("camera", function ( ) smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) end )
-
ِAlright.. tried it.. but still not works... man i tried to do /camera...but still...whatever i want this only shows when player join..and stops when player login ..
-
local pbags = { {2028.2314453125, 648.09765625, 11.366704940796}, {2340.6474609375, 750.9208984375, 11.218271255493}, {1632.525390625, 1035.7626953125, 13.769004821777}, {1494.2626953125, 751.025390625, 29.161626815796}, {1454.25, 751.05859375, 32.736267089844}, {1533.3515625, 751.1181640625, 32.64266204834}, {1427.3037109375, 1462.958984375, 10.8203125} } local bags = { } local gotBag = { } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, i in ipairs ( pbags ) do local baga = createPickup(i[1], i[2], i[3], 3, 1210 ) local bagb = createObject ( 1210, 0, 0, 0 ) addEventHandler ( "onPickupHit", baga, onPickupHit ) bags [ baga ] = bagb end end ) function onPickupHit ( player ) if ( not isPedInVehicle ( player ) and not isPedDead ( player ) and not gotBag [ player ] ) then exports.bone_attach:attachElementToBone ( bags [ source ], player, 12, 0, 0.1, 0.3, 0, 180, 0 ) gotBag [ player ] = bags [ source ] destroyElement ( source ) end end function onBtnClick ( ) if ( gotBag [ source ] ) then local money = math.random ( 1000, 2000 ) givePlayerMoney ( source, money ) destroyElement ( gotBag [ source ] ) triggerClientEvent ( source, "WarningText", source, "reward", "You have rewarded and got ".. money .. "$ from the dealer!! Good Job Pro!" ) outputChatBox ( "you have Rewarded and got ".. money .."$ from the dealer...You are PRO!! Good JOB!", source, 0, 255, 0, false ) triggerClientEvent ( source,"winSound", source ) gotBag [ source ] = nil else triggerClientEvent ( source, "WarningText", source, "reward", "You have to get the briefcase of weapons First!" ) end end addEvent ( "reward", true ) addEventHandler ( "reward", root, onBtnClick ) function onPlayerQuit ( ) if ( gotBag [ source ] ) then destroyElement ( gotBag [ source ] ) local x, y, z = getElementPosition ( source ) local baga = createPickup ( x, y, z, 3, 1210 ) local bagb = createObject ( 1210, 0, 0, 0 ) addEventHandler ( "onPickupHit", baga, onPickupHit ) bags [ baga ] = bagb gotBag [ source ] = nil end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit )
-
Actullly not work smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true
-
اhmm..ok can you give me an example please?
-
It's the one which you posted..then i putted the smothCamera on the right place You Putted this: local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end Then This: smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) So i putted them in one script ...i guess it's right: local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function camRender () local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end function smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end
-
hmm...i'm tried to do... but actually not work see local bagNum = 7 function howMany () if gotBag [ source ] and triggerClientEvent (source, "buttonClick", source) then if bagNum == 7 then bagNum == 6 outputChatBox ("there's "..bagNum.."bags around the city now",source , 255, 255, 255, false) end end addCommandHandler ("test", howMany) can you help me with this?
-
It's the one which you posted..then i putted the smothCamera on the right place