-
Posts
730 -
Joined
-
Last visited
-
Days Won
2
Everything posted by koragg
-
Hey everyone. I wanna extract some of the functionality from the race_progressbar resource but I'm not sure what to do here. I need the distance from player to the next checkpoint to be drawn somewhere on the screen with dxdraw so that it updates live when the player moves (I can draw it but not sure how to actually use the code I have to get it first). Other things like total map distance and distance from spawn to first checkpoint are a bonus If anyone can help out, please reply back. Here's what I found that's connected to the things I need : function calculateCheckpointDistance() local total = 0 local cps = {} local cpsSum = {} local pos = g_Spawnpoints[1].position local prevX, prevY, prevZ = pos[1],pos[2],pos[3] for k,v in ipairs(g_Checkpoints) do local pos = v.position if prevX ~= nil then local distance = getDistanceBetweenPoints3D(pos[1],pos[2],pos[3],prevX,prevY,prevZ) total = total + distance cps[k] = distance cpsSum[k] = total end prevX = pos[1] prevY = pos[2] prevZ = pos[3] end g_CheckpointDistance = cps g_CheckpointDistanceSum = cpsSum g_TotalDistance = total end function distanceFromPlayerToCheckpoint(player, i) -- TODO: check if the index exists local checkpoint = g_Checkpoints[i] if checkpoint == nil then return false end local x, y, z = getElementPosition(player) return getDistanceBetweenPoints3D(x, y, z, unpack(checkpoint.position)) end function calculateDistance(headingForCp,distanceToCp) local sum = g_CheckpointDistanceSum[headingForCp] if sum == nil then return false end local checkpointDistance = g_CheckpointDistance[headingForCp] if distanceToCp > checkpointDistance then distanceToCp = checkpointDistance end return sum - distanceToCp end function calculateDistance2(headingForCp,distanceToCp) local sum = 0 for k,v in ipairs(g_CheckpointDistance) do sum = sum + v if headingForCp == k then if distanceToCp > v then distanceToCp = v end sum = sum - distanceToCp return sum end end return 0 end This was in the client.lua file of the resource (couldn't find mta community link so sry for github one instead).
-
Shouldn't you use bindKey here?
-
A quick search got me this: https://community.multitheftauto.com/index.php?p=profile&id=320386 https://community.multitheftauto.com/index.php?p=resources&s=details&id=6184
- 1 reply
-
- 1
-
Forgot to mention, it's a Windows one, yea. OK then, can't wait for final release, probably gonna install test version on my W10 laptop to help you guys out with bug reporting soon.
- 37 replies
-
- public testing
- release announcement
- (and 4 more)
-
I have a question. Would I need to re-add all the stuff I have on my server (some scripts are integrated into default resources, others I've edited a lot) when I update it to 1.5.3 ?
- 37 replies
-
- public testing
- release announcement
- (and 4 more)
-
Thanks but I already made the save function work like this: function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) function onPlayerSpawn ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end addEventHandler ( "onPlayerSpawn", getRootElement ( ), onPlayerSpawn ) function onPlayerWasted ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end addEventHandler ( "onPlayerWasted", getRootElement ( ), onPlayerWasted ) addEventHandler( 'onPlayerJoin',root, function ( ) setElementData ( source,'LoggedIn',false ) end ) function onPlayerLogin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end if not isGuestAccount( playeraccount ) then setElementData ( source,'LoggedIn',true ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) function onPlayerLogout ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and isGuestAccount(playeraccount) then setPedSkin ( source, 0 ) end end addEventHandler ( "onPlayerLogout", getRootElement ( ), onPlayerLogout ) Just couldn't make the GUI open function client side but as I said a friend helped me with that. Problem fixed Thanks for all your replies guys ^^
-
Awesome resource! Thanks so much for this Been looking for it for some time now.
-
Yes but I got an error (don't remember what exactly). So I asked @dugasz1 and he did this: Server: function open ( ) local skins = getSkinsTable() if getElementData ( client,'LoggedIn' ) ~= true then outputChatBox("You need to register and login in order to set a skin!", client, 255,153,0) return end triggerClientEvent(client, "clothes.showSkin", client, skins) end addEvent("openRequest", true) addEventHandler("openRequest", resourceRoot, open) Client: function sendOpenRequestForServer () triggerServerEvent("openRequest", resourceRoot) end And works now. I just gotta learn those trigger stuff somehow
-
OK, I couldn't achieve absolutely anything with my failed attemps...no surprise as I suck with triggerevents (even after reading wiki).
-
I can try tomorrow but...I hate triggers as I don't understand them at all!
-
I fixed it by using this code : https://community.multitheftauto.com/index.php?p=resources&s=details&id=786 OK, just this...can the command handler be at client side? I'm going to integrate it as a button click but it has to be client function to work, now's server. local screenWidth, screenHeight = guiGetScreenSize() function createSkinWindow() windowWidth, windowHeight = 335, 414 windowX, windowY = (screenWidth / 1) - (windowWidth / 1), (screenHeight / 2) - (windowHeight / 2) skinWindow = guiCreateWindow(290, 250, 350, 410, "Skin Selection Menu", false) guiSetAlpha(skinWindow, 1) skinGridlist = guiCreateGridList(9, 25, 357, 325, false, skinWindow) skinTitleColumn = guiGridListAddColumn(skinGridlist, "Title", 0.45) skinIDColumn = guiGridListAddColumn(skinGridlist, "ID", 0.45) skinBuyButton = guiCreateButton(9, 363, 132, 33, "Set Skin", false, skinWindow) skinExitButton = guiCreateButton(194, 363, 132, 33, "Exit", false, skinWindow) guiSetVisible(skinWindow, false) --Events addEventHandler("onClientGUIClick", skinExitButton, function () guiSetVisible(skinWindow, false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) end, false) addEventHandler("onClientGUIClick", skinBuyButton, buySkin, false) addEventHandler("onClientGUIClick", skinGridlist, previewSkin, false) end addEventHandler("onClientResourceStart", resourceRoot, createSkinWindow) function showSkin(skinsTable) guiGridListClear(skinGridlist) setElementFrozen(localPlayer, true) for category, skins in pairs(skinsTable) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, category, true, false) for id, name in pairs(skins) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, name, false, false) guiGridListSetItemText(skinGridlist, row, 2, id, false, false) end end guiSetVisible(skinWindow, true) showCursor(true) model = getElementModel(localPlayer) end addEvent("clothes.showSkin", true) addEventHandler("clothes.showSkin", root, showSkin) function previewSkin() local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, id) end function buySkin() local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) guiSetVisible(skinWindow, false) showCursor(false) triggerServerEvent("clothes.buySkin", root, id) end
-
Still nothing skinsTable = {} skinsTable.all = {} skinsTable.categories = {} function loadSkins() local xml = xmlLoadFile("files/skins.xml") for index, category in pairs(xmlNodeGetChildren(xml)) do local cName = xmlNodeGetAttribute(category, "name") skinsTable.categories[cName] = {} for index, skin in pairs(xmlNodeGetChildren(category)) do local id, name = xmlNodeGetAttribute(skin, "model"), xmlNodeGetAttribute(skin, "name") skinsTable.categories[cName][id] = name skinsTable.all[id] = name end end xmlUnloadFile(xml) end addEventHandler("onResourceStart", resourceRoot, loadSkins) function getSkinsTable(category) if not category then return skinsTable.categories or false elseif category == "all" then return skinsTable.all or false else return skinsTable[category] or false end return false end function buySkin(model) local playeraccount = getPlayerAccount(client) if playeraccount and not isGuestAccount(playeraccount) then outputChatBox("You have succesfully set "..model.." as your skin!", client, 0, 255, 0, true) setAccountData(playeraccount, "skinid", model) setElementModel(client, model) end end addEvent("clothes.buySkin", true) addEventHandler("clothes.buySkin", root, buySkin) function getBoughtSkin(player) if (not isElement(player)) then return end return tonumber(getAccountData(getPlayerAccount(player), "skinid")) or 0 end function open ( player, cmd ) local skins = getSkinsTable() if getElementData ( player,'LoggedIn' ) ~= true then outputChatBox("You need to register and login in order to set a skin!", player, 255,153,0) return end triggerClientEvent(player, "clothes.showSkin", player, skins) end addCommandHandler("skins", open) function onPlayerQuit() local playeraccount = getPlayerAccount (source) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getskin = getElementModel(source) if ( getskin ) then setAccountData ( playeraccount, "skinid", getskin) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local skinmodel = getAccountData ( playeraccount, "skinid" ) if skinmodel then setElementModel(source, skinmodel) end if not isGuestAccount( playeraccount ) then setElementData ( source,'LoggedIn',true ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
-
Thanks @pa3ck. Now I have other problem, can't seem to save skin ID to account so when player joins (and has set skin before) it would get his account data and set that skin on him. I tried, no errors but skin doesn't save on reconnect or even on mapchange :\ Client (not really needed I guess but still here it is) local screenWidth, screenHeight = guiGetScreenSize() function createSkinWindow() windowWidth, windowHeight = 335, 414 windowX, windowY = (screenWidth / 1) - (windowWidth / 1), (screenHeight / 2) - (windowHeight / 2) skinWindow = guiCreateWindow(290, 250, 350, 410, "Skin Selection Menu", false) guiSetAlpha(skinWindow, 1) skinGridlist = guiCreateGridList(9, 25, 357, 325, false, skinWindow) skinTitleColumn = guiGridListAddColumn(skinGridlist, "Title", 0.45) skinIDColumn = guiGridListAddColumn(skinGridlist, "ID", 0.45) skinBuyButton = guiCreateButton(9, 363, 132, 33, "Set Skin", false, skinWindow) skinExitButton = guiCreateButton(194, 363, 132, 33, "Exit", false, skinWindow) guiSetVisible(skinWindow, false) --Events addEventHandler("onClientGUIClick", skinExitButton, function () guiSetVisible(skinWindow, false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) end, false) addEventHandler("onClientGUIClick", skinBuyButton, buySkin, false) addEventHandler("onClientGUIClick", skinGridlist, previewSkin, false) end addEventHandler("onClientResourceStart", resourceRoot, createSkinWindow) function showSkin(skinsTable) guiGridListClear(skinGridlist) setElementFrozen(localPlayer, true) for category, skins in pairs(skinsTable) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, category, true, false) for id, name in pairs(skins) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, name, false, false) guiGridListSetItemText(skinGridlist, row, 2, id, false, false) end end guiSetVisible(skinWindow, true) showCursor(true) model = getElementModel(localPlayer) end addEvent("clothes.showSkin", true) addEventHandler("clothes.showSkin", root, showSkin) function previewSkin() local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, id) end function buySkin() local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) guiSetVisible(skinWindow, false) showCursor(false) triggerServerEvent("clothes.buySkin", root, id) end Server skinsTable = {} skinsTable.all = {} skinsTable.categories = {} function loadSkins() local xml = xmlLoadFile("files/skins.xml") for index, category in pairs(xmlNodeGetChildren(xml)) do local cName = xmlNodeGetAttribute(category, "name") skinsTable.categories[cName] = {} for index, skin in pairs(xmlNodeGetChildren(category)) do local id, name = xmlNodeGetAttribute(skin, "model"), xmlNodeGetAttribute(skin, "name") skinsTable.categories[cName][id] = name skinsTable.all[id] = name end end xmlUnloadFile(xml) end addEventHandler("onResourceStart", resourceRoot, loadSkins) function getSkinsTable(category) if not category then return skinsTable.categories or false elseif category == "all" then return skinsTable.all or false else return skinsTable[category] or false end return false end function buySkin(model) local playeraccount = getPlayerAccount(source) if playeraccount and not isGuestAccount(playeraccount) then outputChatBox("You have succesfully set "..model.." as your skin!", source, 0, 255, 0, true) setAccountData(playeraccount, "skinid", model) setElementModel(source, model) end end addEvent("clothes.buySkin", true) addEventHandler("clothes.buySkin", root, buySkin) function getBoughtSkin(player) if (not isElement(player)) then return end return tonumber(getAccountData(getPlayerAccount(player), "skinid")) or 0 end function open ( player, cmd ) local skins = getSkinsTable() if getElementData ( player,'LoggedIn' ) ~= true then outputChatBox("You need to register and login in order to set a skin!", player, 255,153,0) return end triggerClientEvent(player, "clothes.showSkin", player, skins) end addCommandHandler("skins", open) function onPlayerQuit(model) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getskin = getElementModel(source, model) if ( getskin ) then setAccountData ( playeraccount, "skinid", getskin) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler( 'onPlayerJoin',root, function ( ) setElementData ( source,'LoggedIn',false ) end ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local skinmodel = getAccountData ( playeraccount, "skinid" ) if skinmodel then setElementModel(source, skinmodel) end if not isGuestAccount( playeraccount ) then setElementData ( source,'LoggedIn',true ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
-
Don't think it's possible. Unless there is some mod on mta community, but I haven't seen anything like it.
-
Hello, it's been some time since I found this awesome resource (click) but I need help with making it work on my race server. As I know posting code here is prefered here goes: Client local screenWidth, screenHeight = guiGetScreenSize() function createSkinWindow() windowWidth, windowHeight = 335, 414 windowX, windowY = (screenWidth / 1) - (windowWidth / 1), (screenHeight / 2) - (windowHeight / 2) skinWindow = guiCreateWindow(windowX, windowY, windowWidth, windowHeight, "CORPG Skin Shop", false) guiSetAlpha(skinWindow, 1) skinGridlist = guiCreateGridList(9, 25, 317, 325, false, skinWindow) skinTitleColumn = guiGridListAddColumn(skinGridlist, "Title", 0.45) skinIDColumn = guiGridListAddColumn(skinGridlist, "ID", 0.2) skinBuyButton = guiCreateButton(9, 371, 132, 33, "Buy Skin\n$500", false, skinWindow) skinExitButton = guiCreateButton(194, 371, 132, 33, "Exit", false, skinWindow) guiSetVisible(skinWindow, false) --Events addEventHandler("onClientGUIClick", skinExitButton, function () guiSetVisible(skinWindow, false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) end, false) addEventHandler("onClientGUIClick", skinBuyButton, buySkin, false) addEventHandler("onClientGUIClick", skinGridlist, previewSkin, false) end addEventHandler("onClientResourceStart", resourceRoot, createSkinWindow) function showSkin(skinsTable) guiGridListClear(skinGridlist) setElementFrozen(localPlayer, true) for category, skins in pairs(skinsTable) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, category, true, false) for id, name in pairs(skins) do local row = guiGridListAddRow(skinGridlist) guiGridListSetItemText(skinGridlist, row, 1, name, false, false) guiGridListSetItemText(skinGridlist, row, 2, id, false, false) end end guiSetVisible(skinWindow, true) showCursor(true) model = getElementModel(localPlayer) end addEvent("clothes.showSkin", true) addEventHandler("clothes.showSkin", root, showSkin) function previewSkin() local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, id) end function buySkin() if (getPlayerMoney() <= 500) then outputChatBox("You can not afford to buy this skin", 255, 0, 0) return end local row = guiGridListGetSelectedItem(skinGridlist) if (not row or row == -1) then return end local id = guiGridListGetItemText(skinGridlist, row, 2) id = tonumber(id) if (not id) then return end setElementModel(localPlayer, model) setElementFrozen(localPlayer, false) guiSetVisible(skinWindow, false) showCursor(false) triggerServerEvent("clothes.buySkin", root, id) triggerServerEvent("clothes.buySkin", root, id) end Server skinsTable = {} skinsTable.all = {} skinsTable.categories = {} shops = { --x, y, z, dimension, interior { x = 207.60717773438, y = -100.33073425293, z = 1004.2578125, dim = 0, int = 15}, { x = 161.3233795166, y = -83.255378723145, z = 1000.8046875, dim = 0, int = 18}, { x = 207.02481079102, y = -129.17749023438, z = 1002.5078125, dim = 0, int = 3}, { x = 204.39889526367, y = -159.35827636719, z = 999.5234375, dim = 0, int = 14}, { x = 206.37413024902, y = -8.2102794647217, z = 1000.2109375, dim = 0, int = 5}, { x = 207.55685424805, y = -100.3268737793, z = 1004.2578125, dim = 1, int = 15}, { x = 161.33987426758, y = -83.251647949219, z = 1000.8046875, dim = 1, int = 18}, { x = 206.37982177734, y = -8.0149660110474, z = 1000.2109375, dim = 1, int = 5}, { x = 207.58236694336, y = -100.33797454834, z = 1004.2578125, dim = 2, int = 15}, { x = 161.47146606445, y = -83.262077331543, z = 1000.8046875, dim = 2, int = 18}, { x = 161.37335205078, y = -83.253326416016, z = 1000.8046875, dim = 3, int = 18}, { x = 207.55435180664, y = -100.32672119141, z = 1004.2578125, dim = 3, int = 15}, { x = 206.95558166504, y = -129.18096923828, z = 1002.5078125, dim = 1, int = 3}, { x = 206.37959289551, y = -7.8779788017273, z = 1000.2109375, dim = 2, int = 5}, } function loadSkins() local xml = xmlLoadFile("files/skins.xml") for index, category in pairs(xmlNodeGetChildren(xml)) do local cName = xmlNodeGetAttribute(category, "name") skinsTable.categories[cName] = {} for index, skin in pairs(xmlNodeGetChildren(category)) do local id, name = xmlNodeGetAttribute(skin, "model"), xmlNodeGetAttribute(skin, "name") skinsTable.categories[cName][id] = name skinsTable.all[id] = name end end xmlUnloadFile(xml) end addEventHandler("onResourceStart", resourceRoot, loadSkins) function getSkinsTable(category) if not category then return skinsTable.categories or false elseif category == "all" then return skinsTable.all or false else return skinsTable[category] or false end return false end function createSkinShops() for index, shop in pairs(shops) do local x, y, z, int, dim = shop.x, shop.y, shop.z, shop.int, shop.dim marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0, 170) setElementInterior(marker, int) setElementDimension(marker, dim) addEventHandler("onMarkerHit", marker, enteredShop) end end addEventHandler("onResourceStart", resourceRoot, createSkinShops) function enteredShop(player, matchingDim) if (player and getElementType(player) == "player" and matchingDim) then local skins = getSkinsTable() triggerClientEvent(player, "clothes.showSkin", player, skins) triggerClientEvent(player, "clothes.showSkin", player, skins) end end function buySkin(model) if (getPlayerMoney(client) >= 500) then takePlayerMoney(client, 500) outputChatBox("You have succesfully bought the skin!", client, 0, 255, 0) setAccountData(getPlayerAccount(client), "clothes.boughtSkin", model) setElementModel(client, model) end end addEvent("clothes.buySkin", true) addEventHandler("clothes.buySkin", root, buySkin) function getBoughtSkin(player) if (not isElement(player)) then return end return tonumber(getAccountData(getPlayerAccount(player), "clothes.boughtSkin")) or 0 end meta <meta> <info author="Anubhav" type="script" name="[A-Team-Skin Shop" descriptions="Skin Shop" version="1.3.4"/> <script src="clothes_c.lua" type="client"/> <script src="clothes_s.lua" type="server"/> <export function="getBoughtSkin" type="server"/> <min_mta_version server="1.3.1-9.04939.0" client="1.3.1-9.04939.0"/> </meta> files/skins.xml <skins> <group name="Special"> <skin model="1" name="Truth" /> <skin model="2" name="Maccer" /> <skin model="265" name="Tenpenny" /> <skin model="266" name="Pulaski" /> <skin model="267" name="Hern" /> <skin model="268" name="Dwayne" /> <skin model="269" name="Big Smoke" /> <skin model="270" name="Sweet" /> <skin model="271" name="Ryder" /> <skin model="272" name="Forelli Guy" /> <skin model="290" name="Rose" /> <skin model="291" name="Kent Paul" /> <skin model="292" name="Cesar" /> <skin model="293" name="OG Loc" /> <skin model="294" name="Wuzi Mu" /> <skin model="295" name="Mike Toreno" /> <skin model="296" name="Jizzy" /> <skin model="297" name="Madd Dogg" /> <skin model="298" name="Catalina" /> <skin model="299" name="Claude from GTA 3" /> <skin model="300" name="Ryder" /> <skin model="301" name="Ryder Robber" /> <skin model="302" name="Emmet" /> <skin model="303" name="Andre" /> <skin model="304" name="Kendl" /> <skin model="305" name="Jethro" /> <skin model="306" name="Zero" /> <skin model="307" name="T-bone Mendez" /> <skin model="308" name="Sindaco Guy" /> <skin model="309" name="Janitor" /> <skin model="310" name="Big Bear" /> <skin model="311" name="Big Smoke with Vest" /> <skin model="312" name="Physco" /> </group> <group name="Beach"> <skin model="18" name="Black Beachguy" /> <skin model="45" name="Beach Mustache" /> <skin model="92" name="Rollergirl" /> <skin model="96" name="Soccer Player" /> <skin model="97" name="Baywatch Dude" /> <skin model="138" name="Bikini Tattoo" /> <skin model="139" name="Yellow Bikini" /> <skin model="140" name="Buxom Bikini" /> <skin model="154" name="Beach Blonde" /> <skin model="251" name="Lifeguard" /> <skin model="252" name="Naked Freak" /> </group> <group name="Casual Generics"> <skin model="7" name="Casual Jeanjacket" /> <skin model="10" name="Old Fat Lady" /> <skin model="14" name="Floral Shirt" /> <skin model="15" name="Plaid Baldy" /> <skin model="20" name="Fresh Prince" /> <skin model="23" name="Skater Kid" /> <skin model="32" name="Eyepatch" /> <skin model="39" name="Old Maid" /> <skin model="53" name="Golf Lady" /> <skin model="54" name="Hispanic Woman" /> <skin model="56" name="Legwarmers 1" /> <skin model="58" name="Chinese Plaid" /> <skin model="60" name="Chinese Casual" /> <skin model="62" name="Pajama Man 1" /> <skin model="69" name="Denim Girl" /> <skin model="72" name="Bearded Hippie" /> <skin model="88" name="Casual Old Lady" /> <skin model="93" name="Hoop Earrings 1" /> <skin model="101" name="Jacket Hippie" /> <skin model="136" name="Old Rasta" /> <skin model="142" name="African 1" /> <skin model="143" name="Sam Jackson" /> <skin model="170" name="PubeStache Tshirt" /> <skin model="182" name="Pajama Man 2" /> <skin model="184" name="Neckbeard" /> <skin model="188" name="Green Shirt" /> <skin model="215" name="Explorer" /> <skin model="218" name="Old Woman" /> <skin model="220" name="African 2" /> <skin model="221" name="Beardo Casual" /> <skin model="222" name="Beardo Clubbing" /> <skin model="224" name="Elderly Asian 1" /> <skin model="225" name="Elderly Asian 2" /> <skin model="226" name="Legwarmers 2" /> <skin model="229" name="Asian Tourist" /> <skin model="231" name="Grannie" /> <skin model="232" name="Grouchy lady" /> <skin model="233" name="Hoop Earrings 2" /> <skin model="234" name="Buzzcut" /> <skin model="236" name="Happy Old Man" /> <skin model="250" name="Green Tshirt" /> <skin model="262" name="Pajama Man 2 b" /> </group> <group name="Celebrities"> <skin model="20" name="Fresh Prince" /> <skin model="91" name="Sharon Stone" /> <skin model="143" name="Sam Jackson" /> <skin model="147" name="Sigmund Freud" /> <skin model="240" name="Hugh Grant" /> <skin model="251" name="Lifeguard" /> <skin model="258" name="Joe Pesci" /> <skin model="259" name="Chris Penn" /> </group> <group name="Country"> <skin model="31" name="Fat Cowgirl" /> <skin model="33" name="Bounty Hunter" /> <skin model="34" name="Marlboro Man" /> <skin model="44" name="Tatooed Plaid" /> <skin model="128" name="Native Rancher" /> <skin model="129" name="Native Librarian" /> <skin model="130" name="Native Ugly" /> <skin model="131" name="Native Sexy" /> <skin model="132" name="Native Geezer" /> <skin model="133" name="Furys Trucker" /> <skin model="157" name="Farmer Girl" /> <skin model="158" name="Farmer" /> <skin model="159" name="Farmer Redneck" /> <skin model="160" name="Bald Redneck" /> <skin model="161" name="Smoking Cowboy" /> <skin model="162" name="Inbred" /> <skin model="196" name="Aunt May" /> <skin model="197" name="Smoking Maid" /> <skin model="198" name="Ranch Cowgirl" /> <skin model="199" name="Heidi" /> <skin model="200" name="Hairy Redneck" /> <skin model="201" name="Trucker Girl" /> <skin model="202" name="Beer Trucker" /> <skin model="236" name="Happy Old Man" /> <skin model="261" name="Southerner" /> </group> <group name="Duplicates"> <skin model="25" name="Varsity jacket" /> <skin model="66" name="Varsity Bandits" /> <skin model="56" name="Legwarmers 1" /> <skin model="226" name="Legwarmers 2" /> <skin model="221" name="Beardo Casual" /> <skin model="222" name="Beardo Clubbing" /> <skin model="247" name="Biker Vest" /> <skin model="254" name="Biker Vest b" /> </group> <group name="Authorities"> <skin model="71" name="Security Guard" /> <skin model="163" name="Casino Bouncer 1" /> <skin model="164" name="Casino Bouncer 2" /> <skin model="165" name="Agent Kay" /> <skin model="166" name="Agent Jay" /> </group> <group name="Fatties"> <skin model="10" name="Old Fat Lady" /> <skin model="31" name="Fat Cowgirl" /> <skin model="38" name="Old Golf Lady" /> <skin model="39" name="Old Maid" /> <skin model="53" name="Golf Lady" /> <skin model="54" name="Hispanic Woman" /> <skin model="88" name="Casual Old Lady" /> <skin model="89" name="Cleaning Lady" /> <skin model="103" name="Baller Jacket" /> <skin model="103" name="Baller Jacket" /> <skin model="105" name="Grove Sweater" /> <skin model="130" name="Native Ugly" /> <skin model="151" name="Melanie" /> <skin model="182" name="Pajama Man 2" /> <skin model="197" name="Smoking Maid" /> <skin model="199" name="Heidi" /> <skin model="207" name="Grove Booty" /> <skin model="218" name="Old Woman" /> <skin model="231" name="Grannie" /> <skin model="232" name="Grouchy lady" /> <skin model="245" name="Ghetto Ho" /> <skin model="258" name="Joe Pesci" /> <skin model="259" name="Chris Penn" /> </group> <group name="Formal Generics"> <skin model="9" name="Business Lady" /> <skin model="17" name="Black suit" /> <skin model="57" name="Chinese Businessman" /> <skin model="61" name="Pilot" /> <skin model="76" name="Businesswoman 1" /> <skin model="141" name="Cute Librarian" /> <skin model="147" name="Sigmund Freud" /> <skin model="148" name="Businesswoman 2" /> <skin model="149" name="Businesswoman 2 b" /> <skin model="150" name="Businesswoman 3" /> <skin model="169" name="Asian Escort" /> <skin model="186" name="Teacher" /> <skin model="187" name="Japanese Businessman 1" /> <skin model="219" name="Lady In Red" /> <skin model="227" name="Japanese Businessman 2" /> <skin model="228" name="Japanese Businessman 3" /> <skin model="255" name="Limo Driver" /> <skin model="263" name="Asian Hostess" /> </group> <group name="Fighters"> <skin model="49" name="Ninja Sensei" /> <skin model="80" name="Red Boxer" /> <skin model="81" name="Blue Boxer" /> <skin model="180" name="Bball Player" /> <skin model="203" name="Ninja 1" /> <skin model="204" name="Ninja 2" /> </group> <group name="Gangs"> <skin model="114" name="Aztecas Stripes" /> <skin model="115" name="Aztecas Jacket" /> <skin model="116" name="Aztecas Shorts" /> <skin model="13" name="Homegirl" /> <skin model="102" name="Baller Shirt" /> <skin model="103" name="Baller Jacket" /> <skin model="104" name="Baller Sweater" /> <skin model="100" name="Biker Blackshirt" /> <skin model="247" name="Biker Vest" /> <skin model="248" name="Biker Headband" /> <skin model="254" name="Biker Vest b" /> <skin model="121" name="Da Nang Army" /> <skin model="122" name="Da Nang Bandana" /> <skin model="123" name="Da Nang Shades" /> <skin model="0" name="CJ" /> <skin model="105" name="Grove Sweater" /> <skin model="106" name="Grove Topbutton" /> <skin model="107" name="Grove Jersey" /> <skin model="207" name="Grove Booty" /> <skin model="125" name="Mafia Enforcer" /> <skin model="126" name="Mafia Wiseguy" /> <skin model="127" name="Mafia Hitman" /> <skin model="173" name="Rifa Hat" /> <skin model="174" name="Rifa Vest" /> <skin model="175" name="Rifa Suspenders" /> <skin model="111" name="Russian Muscle" /> <skin model="112" name="Russian Hitman" /> <skin model="113" name="Russian Boss" /> <skin model="120" name="Sindacco Suit" /> <skin model="124" name="Sindacco Muscle" /> <skin model="117" name="Triad 1" /> <skin model="118" name="Triad 2" /> <skin model="119" name="Triad 3" /> <skin model="108" name="Vagos Topless" /> <skin model="109" name="Vagos Pants" /> <skin model="110" name="Vagos Shorts" /> </group> <group name="Gangstas"> <skin model="19" name="Beach Gangsta" /> <skin model="21" name="Striped Gangsta" /> <skin model="22" name="Orange Sportsman" /> <skin model="28" name="Black Dealer" /> <skin model="29" name="White Dealer" /> <skin model="30" name="Religious Essey" /> <skin model="47" name="Top Button Essey" /> <skin model="67" name="Red Bandana" /> <skin model="143" name="Sam Jackson" /> <skin model="241" name="Afro Brother" /> <skin model="242" name="Dreadlock Brother" /> <skin model="243" name="Ghetto Booty" /> </group> <group name="Girlfriends"> <skin model="190" name="Barbara Schternvart" /> <skin model="191" name="Helena Wankstein" /> <skin model="192" name="Michelle Cannes" /> <skin model="193" name="Katie Zhan" /> <skin model="194" name="Millie Perkins" /> <skin model="195" name="Denise Robinson" /> </group> <group name="Homeless"> <skin model="77" name="Bag Lady" /> <skin model="78" name="Homeless Scarf" /> <skin model="79" name="Fat Homeless" /> <skin model="95" name="Poor Old Man" /> <skin model="134" name="Homeless Smoker" /> <skin model="135" name="Skullcap Hobo" /> <skin model="137" name="Boxhead" /> <skin model="200" name="Hairy Redneck" /> <skin model="212" name="Tin Foil Hat" /> <skin model="213" name="Hobo Elvis" /> <skin model="230" name="Hooded Hobo" /> </group> <group name="Nightclubbers"> <skin model="43" name="Porn Producer" /> <skin model="46" name="Dark Romeo" /> <skin model="59" name="Chinese Romeo" /> <skin model="185" name="Nervous Guy" /> <skin model="223" name="Greasy Nightclubber" /> <skin model="240" name="Hugh Grant" /> </group> <group name="Sex Industry"> <skin model="43" name="Porn Producer" /> <skin model="63" name="Trashy Hooker" /> <skin model="64" name="Transvestite" /> <skin model="75" name="Skanky Hooker" /> <skin model="85" name="Furcoat Hooker" /> <skin model="87" name="Firecrotch" /> <skin model="90" name="Barely Covered" /> <skin model="152" name="Schoolgirl 1" /> <skin model="178" name="Masked Stripper" /> <skin model="237" name="Leopard Hooker" /> <skin model="238" name="Amazon" /> <skin model="244" name="Lace Stripper" /> <skin model="245" name="Ghetto Ho" /> <skin model="246" name="Cop Stripper" /> <skin model="249" name="Pimp" /> <skin model="256" name="Shoolgirl 2" /> <skin model="257" name="Bondage Girl" /> </group> <group name="Sports"> <skin model="13" name="Homegirl" /> <skin model="21" name="Striped Gangsta" /> <skin model="22" name="Orange Sportsman" /> <skin model="23" name="Skater Kid" /> <skin model="24" name="LS Coach" /> <skin model="25" name="Varsity jacket" /> <skin model="36" name="Mailman" /> <skin model="51" name="Black Bicyclist" /> <skin model="52" name="White Bicyclist" /> <skin model="53" name="Golf Lady" /> <skin model="66" name="Varsity Bandits" /> <skin model="80" name="Red Boxer" /> <skin model="81" name="Blue Boxer" /> <skin model="92" name="Rollergirl" /> <skin model="94" name="Andy Capp" /> <skin model="96" name="Soccer Player" /> <skin model="99" name="Rollerguy" /> <skin model="180" name="Bball Player" />` <skin model="195" name="Denise Robinson" /> </group> <group name="Tough Guys"> <skin model="0" name="CJ" /> <skin model="18" name="Black Beachguy" /> <skin model="28" name="Black Dealer" /> <skin model="30" name="Religious Essey" /> <skin model="33" name="Bounty Hunter" /> <skin model="183" name="Klingon" /> </group> <group name="Tourists"> <skin model="26" name="Hiker" /> <skin model="35" name="Fisherman" /> <skin model="37" name="Baseball Dad" /> <skin model="38" name="Old Golf Lady" /> <skin model="210" name="Sloppy Tourist" /> <skin model="235" name="Retired Tourist" /> </group> <group name="Wealthy"> <skin model="12" name="Classy Gold Hooker" /> <skin model="40" name="Classy Dark Hooker" /> <skin model="41" name="Tracksuit Girl" /> <skin model="55" name="Rich Bitch" /> <skin model="91" name="Sharon Stone" /> <skin model="99" name="Rollerguy" /> <skin model="216" name="Turtleneck" /> <skin model="240" name="Hugh Grant" /> </group> <group name="Weirdos"> <skin model="75" name="Skanky Hooker" /> <skin model="137" name="Boxhead" /> <skin model="151" name="Melanie" /> <skin model="167" name="Chicken" /> <skin model="181" name="Punk" /> <skin model="212" name="Tin Foil Hat" /> <skin model="213" name="Hobo Elvis" /> <skin model="230" name="Hooded Hobo" /> <skin model="241" name="Afro Brother" /> <skin model="242" name="Dreadlock Brother" /> <skin model="252" name="Naked Freak" /> <skin model="264" name="Whoopee the Clown" /> </group> <group name="Barbers"> <skin model="156" name="Old Reece" /> <skin model="176" name="Style Barber" /> <skin model="177" name="Vanilla Ice Barber" /> </group> <group name="Career Workers"> <skin model="61" name="Pilot" /> <skin model="68" name="Preist" /> <skin model="70" name="Scientist" /> <skin model="147" name="Sigmund Freud" /> </group> <group name="Casino Workers"> <skin model="11" name="Card Dealer 1" /> <skin model="82" name="Fatty Elvis" /> <skin model="83" name="Whitesuit Elvis" /> <skin model="84" name="Bluesuit Elvis" /> <skin model="163" name="Casino Bouncer 1" /> <skin model="164" name="Casino Bouncer 2" /> <skin model="169" name="Asian Escort" /> <skin model="171" name="Card Dealer 2" /> <skin model="172" name="Card Dealer 3" /> <skin model="189" name="Valet" /> <skin model="213" name="Hobo Elvis" /> <skin model="214" name="Caligula Waitress" /> </group> <group name="Construction Workers"> <skin model="16" name="Earmuff Worker" /> <skin model="27" name="Construction 1" /> <skin model="153" name="Foreman" /> <skin model="260" name="Construction 2" /> </group> <group name="Drug Workers"> <skin model="28" name="Black Dealer" /> <skin model="29" name="White Dealer" /> <skin model="144" name="Drug Worker 1" /> <skin model="145" name="Drug Worker 2" /> <skin model="146" name="Drug Worker 3" /> </group> <group name="Food Workers"> <skin model="155" name="Pizza Guy" /> <skin model="167" name="Chicken" /> <skin model="168" name="Hotdog Vender" /> <skin model="205" name="Burger Girl" /> <skin model="209" name="Noodle Vender" /> <skin model="264" name="Whoopee the Clown" /> </group> <group name="Other Workers"> <skin model="36" name="Mailman" /> <skin model="50" name="Mechanic" /> <skin model="71" name="Security Guard" /> <skin model="189" name="Valet" /> <skin model="251" name="Lifeguard" /> <skin model="253" name="Bus Driver" /> <skin model="255" name="Limo Driver" /> </group> <group name="Truckers"> <skin model="128" name="Native Rancher" /> <skin model="133" name="Furys Trucker" /> <skin model="201" name="Trucker Girl" /> <skin model="202" name="Beer Trucker" /> <skin model="206" name="Money Trucker" /> </group> </skins> I wanna remove the markers part and just make it open/work with a command handler. I tried to delete the shops {} and the shop functions (createskinshops and enteredshop) + added this to client file addCommandHandler ( "skins", createSkinWindow ) but it didn't open the gui nor gave any errors in debug.
-
I recently converted this mod to save everything in account data instead of SQL (I'm not familiar with it and it had some bugs). I used these links to edit it, think they can help you too. https://wiki.multitheftauto.com/wiki/SetAccountData https://wiki.multitheftauto.com/wiki/GetAccountData https://wiki.multitheftauto.com/wiki/SetElementData And remember, delete everything connected with SQL and replace with functions from the above links to make it save all things to account data.
-
Fixed. Line 112 in client file: dff = engineLoadDFF ( "models/BlueNeon.dff", idModel[2] ) BlueNeon.dff - there is no such file. Correct line is this --> dff = engineLoadDFF ( "models/AquaNeon.dff", idModel[2] )
-
Recently I kept receiving complains about this and I'm now sure it's problem with script. So basically, when a player joins my server he says he doesn't see neon but sees default gta objects attached to MY car. If he puts neon on HIS car he sees it as neon, but he sees other's neon as default objects. I never had any problem seeing other people's (or my) neon as neon tubes. I'm gonna mention this as it can have a difference, I'm playing on the same PC on which my server is hosted (is local server, for now). So I've got completely no idea what could be wrong, below's the code. If anyone knows a fix for this, please help Client: local sx, sy = guiGetScreenSize() localPlayer = getLocalPlayer() local visible = false local key = "F2" local neonname = { [1] = "Red", [2] = "Aqua", [3] = "Green", [4] = "Yellow", [5] = "Orange", [6] = "Disable" } local idModel = { [1] = 2057, [2] = 2058, [3] = 2055, [4] = 2059, [5] = 2056 } function openGui() local xBtn = 75 local yBtn = 30 local wBtn = 150 local hBtn = 21 local space = 28 window = guiCreateWindow(sx/2-650,sy/2-155,300,230,"Car Neon Panel",false) Btn1 = guiCreateButton(xBtn,yBtn,wBtn,hBtn,neonname[1],false, window) Btn2 = guiCreateButton(xBtn,yBtn+space,wBtn,hBtn,neonname[2],false, window) Btn3 = guiCreateButton(xBtn,yBtn+2*space,wBtn,hBtn,neonname[3],false, window) Btn4 = guiCreateButton(xBtn,yBtn+3*space,wBtn,hBtn,neonname[4],false, window) Btn5 = guiCreateButton(xBtn,yBtn+4*space,wBtn,hBtn,neonname[5],false, window) Btn6 = guiCreateButton(xBtn,yBtn+5*space,wBtn,hBtn,neonname[6],false, window) info = guiCreateLabel(100, 200, 300, 30,"Full effect at night!", false, window) guiLabelSetColor (info, 255,0,0) guiSetVisible(window, visible) end function start_cl_resource() openGui() if ( guiGetVisible(window) == true ) then showCursor(true) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start_cl_resource) function hideGui() if getElementData ( localPlayer,'LoggedIn' ) ~= true then outputChatBox("You need to register and login in order to set neon on your cars!", 255,153,0) return end if (guiGetVisible(window) == false) then guiSetVisible(window, true) showCursor(true) else guiSetVisible(window, false) showCursor(false) end end addCommandHandler("neon",hideGui) function onGuiClickPanel (button, state, absoluteX, absoluteY) if (source == Btn1) then setElementData( localPlayer, "neon", idModel[1] ) outputChatBox("#FFFFFFYour neon color is now #FF0000Red", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn2) then setElementData( localPlayer, "neon", idModel[2] ) outputChatBox("#FFFFFFYour neon color is now #00FFFFAqua", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn3) then setElementData( localPlayer, "neon", idModel[3] ) outputChatBox("#FFFFFFYour neon color is now #00FF00Green", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn4) then setElementData( localPlayer, "neon", idModel[4] ) outputChatBox("#FFFFFFYour neon color is now #FFCC00Yellow", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn5) then setElementData( localPlayer, "neon", idModel[5] ) outputChatBox("#FFFFFFYour neon color is now #FFA500Orange", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn6) then setElementData( localPlayer, "neon", 0 ) outputChatBox("#FFFFFFYou have removed neon from your car!", 255,255,255, true) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClickPanel) function replaceTXD() dff = engineLoadDFF ( "models/RedNeon.dff", idModel[1] ) engineReplaceModel ( dff, idModel[1] ) dff = engineLoadDFF ( "models/BlueNeon.dff", idModel[2] ) engineReplaceModel ( dff, idModel[2] ) dff = engineLoadDFF ( "models/GreenNeon.dff", idModel[3] ) engineReplaceModel ( dff, idModel[3] ) dff = engineLoadDFF ( "models/YellowNeon.dff", idModel[4] ) engineReplaceModel ( dff, idModel[4] ) dff = engineLoadDFF ( "models/OrangeNeon.dff", idModel[5] ) engineReplaceModel ( dff, idModel[5] ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) Server: local validvehs = {--Vehicles with neon 400, 401, 402, 404, 405, 409, 410, 411, 412, 415, 419, 420, 421, 426, 429, 436, 438, 439, 442, 445, 451, 458, 466, 467, 474, 475, 477, 478, 479, 480, 489, 490, 491, 492, 494, 496, 500, 502, 503, 505, 506, 507, 516, 517, 518, 526, 527, 529, 533, 534, 535, 536, 540, 541, 542, 543, 545, 546, 547, 549, 550, 551, 554, 555, 558, 559, 560, 561, 562, 565, 566, 567, 576, 579, 580, 585, 587, 589, 600, 602, 603, 604, 605, 422, 474, 478, 575, --Vehicles without neon 403, 406, 407, 408, 413, 414, 416, 417, 418, 423, 424, 425, 427, 428, 430, 431, 432, 433, 434, 435, 437, 440, 441, 443, 444, 446, 447, 448, 449, 450, 452, 453, 454, 455, 456, 457, 459, 460, 461, 462, 463, 464, 465, 468, 469, 470, 471, 472, 473, 476, 481, 482, 483, 484, 485, 486, 487, 488, 493, 495, 497, 498, 499, 501, 504, 508, 509, 510, 511, 512, 513, 514, 515, 519, 520, 521, 522, 523, 524, 525, 528, 530, 531, 532, 537, 538, 539, 544, 548, 552, 553, 556, 557, 563, 564, 568, 569, 570, 571, 572, 573, 574, 577, 578, 581, 582, 583, 584, 586, 588, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 601, 606, 607, 608, 609, 610, 611 } local neons_ = {} function neons (theVehicle) local playeraccount = getPlayerAccount ( source ) if playeraccount and isGuestAccount(playeraccount) then return end local pla = getVehicleController(theVehicle) if not neons_[pla] then neons_[pla] = {_0=false,_1=false,_2=false,_3=false} end local NeonType = getElementData(source, "neon") if not NeonType or ( NeonType == 0 ) then return end local x, y, z = getElementPosition ( theVehicle ) if not x or not y or not z then return end local id = getElementModel (theVehicle) if isElement (neons_[pla]._0) then destroyElement(neons_[pla]._0) end -- to solve some problems if isElement (neons_[pla]._1) then destroyElement(neons_[pla]._1) end if isElement (neons_[pla]._2) then destroyElement(neons_[pla]._2) end if isElement (neons_[pla]._3) then destroyElement(neons_[pla]._3) end neons_[pla]._0 = createObject ( NeonType, x, y, z ) neons_[pla]._1 = createObject ( NeonType, x, y, z ) neons_[pla]._2 = createObject ( NeonType, x, y, z ) neons_[pla]._3 = createObject ( NeonType, x, y, z ) local neon,neon1,neon2,neon3 = neons_[pla]._0,neons_[pla]._1,neons_[pla]._2,neons_[pla]._3 if ( id == 401 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.99, 0, -0.55 ) attachElements ( neon, theVehicle or source, -0.99, 0, -0.55 ) elseif ( id == 411 ) then attachElements ( neon3, theVehicle or source, 0, 2.55, -0.6, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.25, -0.55, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.97, 0, -0.59 ) attachElements ( neon, theVehicle or source, -0.97, 0, -0.59 ) elseif ( id == 429 ) then attachElements ( neon3, theVehicle or source, 0, 2, -0.5, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.25, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.88, 0, -0.5 ) attachElements ( neon, theVehicle or source, -0.88, 0, -0.5 ) elseif ( id == 445 ) then attachElements ( neon3, theVehicle or source, 0, 2.25, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.65, -0.52, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.55 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.55 ) elseif ( id == 535 ) then attachElements ( neon3, theVehicle or source, 0, 2.35, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.55, -0.5, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.09, 0, -0.6 ) attachElements ( neon, theVehicle or source, -1.09, 0, -0.6 ) elseif ( id == 536 ) then attachElements ( neon3, theVehicle or source, 0, 2.3, -0.5, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.95, -0.5, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.6 ) elseif ( id == 496 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.87, 0, -0.5 ) attachElements ( neon, theVehicle or source, -0.87, 0, -0.5 ) elseif ( id == 602 ) then attachElements ( neon3, theVehicle or source, 0, 2.35, -0.58, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.45, -0.55, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.04, 0, -0.6 ) attachElements ( neon, theVehicle or source, -1.04, 0, -0.6 ) elseif ( id == 518 ) then attachElements ( neon3, theVehicle or source, 0, 2.7, -0.45, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.6, -0.42, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.06, 0, -0.48 ) attachElements ( neon, theVehicle or source, -1.06, 0, -0.48 ) elseif ( id == 402 ) then attachElements ( neon3, theVehicle or source, 0, 2.5, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.55, -0.44, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.03, 0, -0.6 ) attachElements ( neon, theVehicle or source, -1.03, 0, -0.6 ) elseif ( id == 541 ) then attachElements ( neon3, theVehicle or source, 0, 2.15, -0.43, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.04, -0.35, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, 0, -0.45 ) attachElements ( neon, theVehicle or source, -0.92, 0, -0.45 ) elseif ( id == 438 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.68, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.6, -0.68, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.72 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.72 ) elseif ( id == 527 ) then attachElements ( neon3, theVehicle or source, 0, 2.4, -0.34, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.05, -0.34, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, 0.15, -0.47 ) attachElements ( neon, theVehicle or source, -0.92, 0.15, -0.47 ) elseif ( id == 415 ) then attachElements ( neon3, theVehicle or source, 0, 2.45, -0.54, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.15, -0.52, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.96, 0, -0.57 ) attachElements ( neon, theVehicle or source, -0.96, 0, -0.57 ) elseif ( id == 542 ) then attachElements ( neon3, theVehicle or source, 0, 2.55, -0.37, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.65, -0.32, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.94, 0, -0.59 ) attachElements ( neon, theVehicle or source, -0.94, 0, -0.59 ) elseif ( id == 466 ) then attachElements ( neon3, theVehicle or source, 0, 2.55, -0.43, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.85, -0.41, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.02, 0, -0.54 ) attachElements ( neon, theVehicle or source, -1.02, 0, -0.54 ) elseif ( id == 604 ) then attachElements ( neon3, theVehicle or source, 0, 2.55, -0.43, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.85, -0.41, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.02, 0, -0.54 ) attachElements ( neon, theVehicle or source, -1.02, 0, -0.54 ) elseif ( id == 589 ) then attachElements ( neon3, theVehicle or source, 0, 2.3, -0.38, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.25, -0.33, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, 0.1, -0.43 ) attachElements ( neon, theVehicle or source, -0.92, 0.1, -0.43 ) elseif ( id == 480 ) then attachElements ( neon3, theVehicle or source, 0, 2.15, -0.53, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.35, -0.48, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.53 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.53 ) elseif ( id == 507 ) then attachElements ( neon3, theVehicle or source, 0, 2.75, -0.56, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3, -0.56, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.12, 0, -0.62 ) attachElements ( neon, theVehicle or source, -1.12, 0, -0.62 ) elseif ( id == 562 ) then attachElements ( neon3, theVehicle or source, 0, 2.35, -0.48, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.1, -0.4, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.98, 0.05, -0.45 ) attachElements ( neon, theVehicle or source, -0.98, 0.05, -0.45 ) elseif ( id == 419 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.9, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.98, 0.1, -0.58 ) attachElements ( neon, theVehicle or source, -0.98, 0.1, -0.58 ) elseif ( id == 587 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.5, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.07, -0.05, -0.53 ) attachElements ( neon, theVehicle or source, -1.07, -0.05, -0.53 ) elseif ( id == 533 ) then attachElements ( neon3, theVehicle or source, 0, 2.45, -0.32, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.5, -0.32, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.96, 0, -0.47 ) attachElements ( neon, theVehicle or source, -0.96, 0, -0.47 ) elseif ( id == 565 ) then attachElements ( neon3, theVehicle or source, 0, 2.05, -0.45, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.95, -0.3, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.85, 0.1, -0.45 ) attachElements ( neon, theVehicle or source, -0.85, 0.1, -0.45 ) elseif ( id == 526 ) then attachElements ( neon3, theVehicle or source, 0, 2.47, -0.48, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.4, -0.43, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.93, 0, -0.58 ) attachElements ( neon, theVehicle or source, -0.93, 0, -0.58 ) elseif ( id == 492 ) then attachElements ( neon3, theVehicle or source, 0, 2.57, -0.42, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.77, -0.42, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.93, 0, -0.5 ) attachElements ( neon, theVehicle or source, -0.93, 0, -0.5 ) elseif ( id == 494 ) then attachElements ( neon3, theVehicle or source, 0, 2.4, -0.67, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3, -0.53, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, -0.05, -0.68 ) attachElements ( neon, theVehicle or source, -0.92, -0.05, -0.68 ) elseif ( id == 502 ) then attachElements ( neon3, theVehicle or source, 0, 2.5, -0.69, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.49, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, -0.05, -0.67 ) attachElements ( neon, theVehicle or source, -0.92, -0.05, -0.67 ) elseif ( id == 503 ) then attachElements ( neon3, theVehicle or source, 0, 2.5, -0.67, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.51, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.92, -0.05, -0.67 ) attachElements ( neon, theVehicle or source, -0.92, -0.05, -0.67 ) elseif ( id == 579 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.97, 0.05, -0.55 ) attachElements ( neon, theVehicle or source, -0.97, 0.05, -0.55 ) elseif ( id == 545 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.96, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.96, 0, -0.6 ) elseif ( id == 546 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 1.06, -0.1, -0.53 ) attachElements ( neon, theVehicle or source, -1.06, -0.1, -0.53 ) elseif ( id == 559 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.42, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.3, -0.28, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.97, 0, -0.48 ) attachElements ( neon, theVehicle or source, -0.97, 0, -0.48 ) elseif ( id == 400 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.67 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.67 ) elseif ( id == 517 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 1, 0.1, -0.58 ) attachElements ( neon, theVehicle or source, -1, 0.1, -0.58 ) elseif ( id == 410 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.91, 0, -0.43 ) attachElements ( neon, theVehicle or source, -0.91, 0, -0.43 ) elseif ( id == 551 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.48, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3, -0.43, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.98, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.98, 0, -0.6 ) elseif ( id == 500 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 1.02, 0.2, -0.6 ) attachElements ( neon, theVehicle or source, -1.02, 0.2, -0.6 ) elseif ( id == 516 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.63, -0.53, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0, -0.65 ) attachElements ( neon, theVehicle or source, -1, 0, -0.65 ) elseif ( id == 467 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.43, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.9, -0.4, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0, -0.55 ) attachElements ( neon, theVehicle or source, -1, 0, -0.55 ) elseif ( id == 404 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.85, 0, -0.46 ) attachElements ( neon, theVehicle or source, -0.85, 0, -0.46 ) elseif ( id == 603 ) then attachElements ( neon3, theVehicle or source, 0, 2.41, -0.61, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.5, -0.5, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.97, 0, -0.65 ) attachElements ( neon, theVehicle or source, -0.97, 0, -0.65 ) elseif ( id == 600 ) then attachElements ( neon3, theVehicle or source, 0, 2.67, -0.38, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.36, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0.15, -0.53 ) attachElements ( neon, theVehicle or source, -1, 0.15, -0.53 ) elseif ( id == 426 ) or ( id == 420 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.42, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.02, 0, -0.5 ) attachElements ( neon, theVehicle or source, -1.02, 0, -0.5 ) elseif ( id == 489 ) or ( id == 505 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 1.25, 0.1, -0.75 ) attachElements ( neon, theVehicle or source, -1.25, 0.1, -0.75 ) elseif ( id == 436 ) or ( id == 547 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.51 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.51 ) elseif ( id == 479 ) then attachElements ( neon3, theVehicle or source, 0, 2.5, -0.38, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.66, -0.38, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.49 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.49 ) elseif ( id == 534 ) then attachElements ( neon3, theVehicle or source, 0, 2.9, -0.58, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.8, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0, -0.6 ) attachElements ( neon, theVehicle or source, -1, 0, -0.6 ) elseif ( id == 442 ) then attachElements ( neon3, theVehicle or source, 0, 2.8, -0.58, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3.1, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.02, 0, -0.65 ) attachElements ( neon, theVehicle or source, -1.02, 0, -0.65 ) elseif ( id == 475 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.93, 0, -0.58 ) attachElements ( neon, theVehicle or source, -0.93, 0, -0.58 ) elseif ( id == 605 ) or ( id == 543 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.98, 0, -0.47 ) attachElements ( neon, theVehicle or source, -0.98, 0, -0.47 ) elseif ( id == 567 ) then attachElements ( neon3, theVehicle or source, 0, 2.8, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.84, -0.54, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.1, 0.25, -0.65 ) attachElements ( neon, theVehicle or source, -1.1, 0.25, -0.65 ) elseif ( id == 405 ) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.93, 0, -0.65 ) attachElements ( neon, theVehicle or source, -0.93, 0, -0.65 ) elseif ( id == 458 ) then attachElements ( neon3, theVehicle or source, 0, 2.45, -0.52, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.65, -0.56, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.65 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.65 ) elseif ( id == 580 ) then attachElements ( neon3, theVehicle or source, 0, 2.57, -0.44, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.41, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.1, 0, -0.53 ) attachElements ( neon, theVehicle or source, -1.1, 0, -0.53 ) elseif ( id == 439 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.35, -0.45, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0.15, -0.68 ) attachElements ( neon, theVehicle or source, -0.9, 0.15, -0.68 ) elseif ( id == 561 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.53, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.58, -0.48, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.6 ) elseif ( id == 409 ) then attachElements ( neon3, theVehicle or source, 0.9, 1, -0.53 ) attachElements ( neon2, theVehicle or source, -0.9, 1, -0.53 ) attachElements ( neon1, theVehicle or source, 0.9, -1, -0.53 ) attachElements ( neon, theVehicle or source, -0.9, -1, -0.53 ) elseif ( id == 560 ) then attachElements ( neon3, theVehicle or source, 0, 2.5, -0.4, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.25, -0.29, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.98, 0.05, -0.49 ) attachElements ( neon, theVehicle or source, -0.98, 0.05, -0.49 ) elseif ( id == 550 ) then attachElements ( neon3, theVehicle or source, 0, 2.6, -0.64, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.6, -0.63, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.1, 0, -0.63 ) attachElements ( neon, theVehicle or source, -1.1, 0, -0.63 ) elseif ( id == 506 ) then attachElements ( neon3, theVehicle or source, 0, 2.08, -0.52, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.3, -0.44, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.94, -0.15, -0.53 ) attachElements ( neon, theVehicle or source, -0.94, -0.15, -0.53 ) elseif ( id == 451 ) then attachElements ( neon3, theVehicle or source, 0, 2.45, -0.57, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.1, -0.48, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, -0.15, -0.55 ) attachElements ( neon, theVehicle or source, -1, -0.15, -0.55 ) elseif ( id == 566 ) then attachElements ( neon3, theVehicle or source, 0, 2.67, -0.39, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3.03, -0.34, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, -0.15, -0.52 ) attachElements ( neon, theVehicle or source, -1, -0.15, -0.52 ) elseif ( id == 549 ) then attachElements ( neon3, theVehicle or source, 0, 2.45, -0.41, 0, 0, 90 ) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.97, 0, -0.46 ) attachElements ( neon, theVehicle or source, -0.97, 0, -0.46 ) elseif ( id == 576 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -3.1, -0.33, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.03, 0, -0.45 ) attachElements ( neon, theVehicle or source, -1.03, 0, -0.45 ) elseif ( id == 558 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.35, -0.29, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, -0.05, -0.4 ) attachElements ( neon, theVehicle or source, -0.95, -0.05, -0.4 ) elseif ( id == 540 ) then attachElements ( neon3, theVehicle or source, 0, 2.55, -0.62, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.65, -0.56, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.05, 0, -0.68 ) attachElements ( neon, theVehicle or source, -1.05, 0, -0.68 ) elseif ( id == 491 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.83, -0.47, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.62 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.62 ) elseif ( id == 412 ) then attachElements ( neon3, theVehicle or source, 0, 2.63, -0.45, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -3.42, -0.42, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, -0.2, -0.63 ) attachElements ( neon, theVehicle or source, -1, -0.2, -0.63 ) elseif ( id == 421 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.96, -0.49, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0.1, -0.63 ) attachElements ( neon, theVehicle or source, -0.95, 0.1, -0.63 ) elseif ( id == 529 ) then destroyElement(neon3) attachElements ( neon2, theVehicle or source, 0, -2.53, -0.32, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, -0.05, -0.43 ) attachElements ( neon, theVehicle or source, -1, -0.05, -0.43 ) elseif ( id == 555) then destroyElement(neon3) destroyElement(neon2) attachElements ( neon1, theVehicle or source, 0.8, 0, -0.47 ) attachElements ( neon, theVehicle or source, -0.8, 0, -0.47 ) elseif ( id == 554) then attachElements ( neon3, theVehicle or source, 0, 2.49, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.75, -0.51, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.2, 0, -0.47 ) attachElements ( neon, theVehicle or source, -1.2, 0, -0.47 ) elseif ( id == 477) then attachElements ( neon3, theVehicle or source, 0, 2.56, -0.52, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.7, -0.37, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.02, 0, -0.56 ) attachElements ( neon, theVehicle or source, -1.02, 0, -0.56 ) elseif ( id == 585) then attachElements ( neon3, theVehicle or source, 0, 2.8, -0.3, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.9, -0.22, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.05, 0, -0.4 ) attachElements ( neon, theVehicle or source, -1.05, 0, -0.4 ) elseif ( id == 422) then attachElements ( neon3, theVehicle or source, 0, 2.1, -0.6, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.4, -0.65, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.88, 0, -0.65 ) attachElements ( neon, theVehicle or source, -0.88, 0, -0.65 ) elseif ( id == 474) then attachElements ( neon3, theVehicle or source, 0, 2.57, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.75, -0.55, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0, -0.6 ) attachElements ( neon, theVehicle or source, -1, 0, -0.6 ) elseif ( id == 478) then attachElements ( neon3, theVehicle or source, 0, 2.1, -0.58, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.3, -0.48, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0.3, -0.65 ) attachElements ( neon, theVehicle or source, -0.95, 0.3, -0.65 ) elseif ( id == 575) then attachElements ( neon3, theVehicle or source, 0, 2.15, -0.32, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -2.6, -0.32, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1, 0, -0.38 ) attachElements ( neon, theVehicle or source, -1, 0, -0.38 ) else -- if vehicle doesn't have neon then you don't need the object destroyElement(neon) destroyElement(neon1) destroyElement(neon2) destroyElement(neon3) end end addEventHandler( "onPlayerVehicleEnter",getRootElement(),neons ) addEvent( "attachNeon", true ) addEventHandler( "attachNeon", getRootElement(), neons ) function detachNeon( theVehicle ) local attachedElements = getAttachedElements ( theVehicle ) for i,v in ipairs ( attachedElements ) do detachElements ( v, theVehicle ) destroyElement ( v ) end end addEventHandler( "onPlayerVehicleExit", getRootElement(), detachNeon ) addEvent( "detachNeon", true ) addEventHandler( "detachNeon", getRootElement(), detachNeon ) local vehmodel = {} function onPlayerQuit() vehmodel[source] = nil if neons_[source] ~= nil then if neons_[source] and neons_[source]._0 and isElement (neons_[source]._0) then destroyElement(neons_[source]._0) end -- to solve some problems if neons_[source] and neons_[source]._1 and isElement (neons_[source]._1) then destroyElement(neons_[source]._1) end if neons_[source] and neons_[source]._2 and isElement (neons_[source]._2) then destroyElement(neons_[source]._2) end if neons_[source] and neons_[source]._3 and isElement (neons_[source]._3) then destroyElement(neons_[source]._3) end neons_[source] = nil end local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getNeonType = getElementData(source, "neon") if ( getNeonType ) then setAccountData ( playeraccount, "neon", getNeonType) local theVehicle = getPedOccupiedVehicle ( source ) if ( getNeonType ~= 0 ) and ( theVehicle ) then detachNeon( theVehicle ) end end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler( 'onPlayerJoin',root, function ( ) setElementData ( source,'LoggedIn',false ) end ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getNeonTypeAccData = getAccountData ( playeraccount, "neon" ) local theVehicle = getPedOccupiedVehicle ( source ) if not isGuestAccount( playeraccount ) then setElementData ( source,'LoggedIn',true ) end if ( getNeonTypeAccData ~= 0 ) then setElementData(source, "neon", getNeonTypeAccData) neons(theVehicle) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) function onPlayerLogout (_, playeraccount) if (playeraccount) then local getNeonType = getElementData(source, "neon") if ( getNeonType ) then local theVehicle = getPedOccupiedVehicle ( source ) setElementData ( source,'LoggedIn',false ) if ( getNeonType ~= 0 ) and ( theVehicle ) then detachNeon( theVehicle ) end end end end addEventHandler ( "onPlayerLogout", getRootElement ( ), onPlayerLogout ) addEvent("onPlayerReachCheckpoint",true) -- vehicle change addEventHandler("onPlayerReachCheckpoint",root,function() local playeraccount = getPlayerAccount ( source ) if isGuestAccount(playeraccount) then return end local veh = getPedOccupiedVehicle(source) if isElement(veh) then modelver (veh,source) end end) addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",root,function(id,ptype) local playeraccount = getPlayerAccount ( source ) if isGuestAccount(playeraccount) then return end if ptype == "vehiclechange" then local veh = getPedOccupiedVehicle(source) if isElement(veh) then modelver (veh,source) end end end) addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish",root,function() local playeraccount = getPlayerAccount ( source ) if isGuestAccount(playeraccount) then return end local veh = getPedOccupiedVehicle(source) if isElement(veh) then modelver (veh,source) end end) function modelver (veh,pla) local model = getElementModel(veh) if vehmodel[pla] == nil then neons (veh) vehmodel[pla] = model elseif vehmodel[pla] ~= model then neons (veh) vehmodel[pla] = model end end meta: <meta> <info author="Kostya/MegasXLR/Wojak" name="Neon Panel" type="script" version="0.0.3"/> <script src='server.lua' type='server' /> <script src='client.lua' type='client' /> <export function="hideGui" type="client"/> <file src='models/AquaNeon.dff' /> <file src='models/GreenNeon.dff' /> <file src='models/OrangeNeon.dff' /> <file src='models/RedNeon.dff' /> <file src='models/YellowNeon.dff' /> </meta>
-
I actually used guieditor before to create a centered site logo at top of screen (was so long ago I forgot that resource exists ). Anyway, thanks for your help, with the following line it looks perfect on known resolutions and is fine on less known ones (like 1680x1050) as well. dxDrawText(daystring, sx_*0.1019, sy_*0.7051, sx_*0.1714, sy_*0.6287, tocolor(255,255,0,255), 0.6*sy, "bankgothic", "center", "top", false, false, false, false, false)