-
Posts
85 -
Joined
-
Last visited
Everything posted by [DemoN]
-
Sorry but I need a problem again I have tested this script on my friends server and it's working but I can't see my friend's icon and he can't see mine too. What do I need to do?
-
I have same problem but I don't fall, just I can't see the floor and dunno how to fix it. Be sure teleporting the player to interior (not coordinates). Maybe it can help you...
-
maybe they unbinded it
-
A lot of servers use Freeroam and Play resource at the same time. You can change spawn point in the Play resource...
-
and please use .. so we can understand your script... GARAGE_ID = 22 addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(11389) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(22)) then -- open the door setGarageOpen(22, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(22)) then -- close the door setGarageOpen(22, false) end end end
-
When you press enter, you will die (If your server is a DM, DD or a Race server)...
-
an example from wiki: GARAGE_ID = 25 -- create a collision shape and attach event handlers to it when the resource starts addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(1337, 194, 28, 6, 10, 4) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(GARAGE_ID)) then -- open the door setGarageOpen(GARAGE_ID, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(GARAGE_ID)) then -- close the door setGarageOpen(GARAGE_ID, false) end end end and you can find Garage ID's: https://wiki.multitheftauto.com/wiki/Garage
-
Thank you! Now It is really a script Thank you Solidsnake14 (a.k.a. Castillo) and JR10 (a.k.a. Jacob)
-
Sorry but I need a little help I want to destroy the pickup when other pickup selected
-
lol I had tried it and it just spawned pickups but when I changed my skin it attached :D anyway thank you guys. If i share this script, I will add your names in meta.xml and in description Edit: How to attach... This is my skin I'm typing /ss 29 and attached
-
It's not working my debugscript says nothing... If you don't want to help me anymore (because it's getting hard and hard!), you can give up
-
The Script became crazy... WARNING: freeroam/gui.lua:235: Bad argument @ attachElements here is the line 235: clickhandler = function() wnd.onclick() end Edit: I'm working on fr_client.lua but bad argument is in gui.lua
-
when I use {'btn', id='Use', onclick=attachElements} (When I click Use button) it says bad argument @ attachElements (but when I double click nothing happens) and when I use {'btn', id='Use', onclick=onDoubleClick} nothing happens.
-
I'm going to be crazy!!! ---------------------------- -------- Icon window ------- ---------------------------- wndIcon = { 'wnd', text = 'Icon Window', width = 250, controls = { { 'lst', id='IconGridList', width=230, height=280, columns={ {text='Icons', attr='name'} }, rows={xml='icons.xml', attrs={'id', 'name'}}, }, {'btn', id='Use', onclick=attachElements}, {'btn', id='Close', closeswindow=true} } } function getIconIDByName(name) for i, v in ipairs(getElementsByType('icon')) do if getElementData(v, 'name') == name then return tonumber(getElementData(v, 'id')) end end end function onDoubleClick(botton, state) local row, column = guiGridListGetSelectedItem(IconGridList) local text = guiGridListGetItemText(IconGridList, row, column) local icon = getIconIDByName(text) local leaf = createPickup(0, 0, 0, 3, icon) attachElements(leaf, g_Me, 0, 0, 1.5) end FR Gui appears, Grid list appears, when i click on an item, nothing happens. my debugscript doesn't say anything...
-
No but I have same problem again and my debugscript says: '(' expected near 'getIconIDByName'
-
wndIcon = { 'wnd', text = 'Icon Window', width = 250, controls = { { 'lst', id='IconGridList', width=230, height=280, columns={ {text='Icons', attr='name'} }, rows={xml='icons.xml', attrs={'id', 'name'}}, function getIconIDByName(name) for i, v in ipairs(getElementsByType('icon')) do if getElementData(v, 'name') == name then return tonumber(getElementData(v, 'id')) end end end function onDoubleClick(botton, state) local row, column = guiGridListGetSelectedItem(IconGridList) local text = guiGridListGetItemText(IconGridList, row, column) local icon = getIconIDByName(text) local leaf = createPickup(0, 0, 0, 3, icon) attachElements(leaf, g_Me, 0, 0, 1.5) }, {'btn', id='Use', onclick=attachElements}, {'btn', id='Close', closeswindow=true} } } I have changed my script like that but i think it's wrong ( I have edited it wrong. I don't say your informations are wrong ) when I press F1, nothing happens
-
No he wanted to add blips on his map and draw a text on his marker and i gave the link of drawing a text.... Btw You can use this function... DxDrawText
-
Yes... and you can use getElementsByType and find a helicopter near the player, bind x (or another key) and make him attach to helicopter...
-
just use getElementsByType and find a helicopter near the player, bind x (or another key) and make him attach to helicopter...
-
getAlivePlayers, getDeadPlayers getAlivePlayers getDeadPlayers try these functions...
-
You can use this script: https://community.multitheftauto.com/ind ... ils&id=609 If you want to make it yourself,
-
https://community.multitheftauto.com/ind ... ls&id=1960 You can use that script...
-
onitemdoubleclick=function(leaf) attachElements(leaf, g_Me, 0, 0, 1.5) end ("g_Me = getLocalPlayer()") List is ok but check my debugscript: it says bad argument @ attachElements