xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
on srever side: addGroupSpawner({1319.1091308594, -2584.6645507813, 13.5390625}, {{411}, {412}}, {120, 0, 255}) (the "{{411}, {412}}")
-
For some reason, its saying that @ line 5 (client) ( local name = getVehicleNameFromModel(v) ) that "V" is a bad argument - Server function addGroupSpawner(pos,cars,color) x,y,z,rotz = unpack(pos) local r,g,b = unpack (color) marker = createMarker(x, y, z - 1, "cylinder", 2, r, g, b, 150) addEventHandler("onMarkerHit",marker, function (p) triggerClientEvent(p,"showGroupVehicleSpawners",p,cars) end ) end addGroupSpawner({1319.1091308594, -2584.6645507813, 13.5390625}, {{411}, {412}}, {120, 0, 255}) ----------------------- -- Unfinsihed ----------------------- vehicle = {} function onCreateGroupVehicle(id) if (id) then vehicle[source] = createVehicle(id, x, y, z, rotz) end end addEvent("onCreateGroupVehicle",true) addEventHandler("onCreateGroupVehicle",root,onCreateGroupVehicle) - Bugged client area function showGroupVehicleSpawners(cars) guiSetVisible(window['groups'],true) showCursor(true) for i,v in ipairs (cars) do local name = getVehicleNameFromModel(v) row = guiGridListAddRow(gridlist['groups']) guiGridListSetItemText(gridlist['groups'], row, 1, name, false, false) guiGridListSetItemData(gridlist['groups'], row, 1, v) end end addEvent("showGroupVehicleSpawners",true) addEventHandler("showGroupVehicleSpawners",root,showGroupVehicleSpawners)
-
Hey guys, idk why, but for some reason i just cannot figure this script out.... It wont give the ID addEventHandler("onClientClick",root, function (_,_,_,_,_,_,_,element) if (getElementType(element)=="object") then outputChatBox("ID: "..getElementID(element)) end end )
-
u can lock godmode to a skin....: local skinId = 217 -- The skin that prevents damage addEventHandler("onClientPlayerDamage", localPlayer, function() if getElementModel(source) ==skinId then cancelEvent() end end )
-
Could you show me a basic example of how it would look? Please.
-
Try this: local player = getLocalPlayer function buyweapon (player,command) if (getPlayerMoney(player) > 1999) then -- 1999 will acculy be 200 outputChatBox ( "#00FF00Congratulations You Buyed M4 for 2000!", 255, 255, 255, true ) giveWeapon ( player, 31, 200 ) takePlayerMoney ( player, 2000 ) else outputChatBox ( "#00FF00You Don't Have Enough Money!", 255, 255, 255, true ) end end addCommandHandler ( "buym4", buyweapon )
-
It depends, if its scripted so they don't open gates, then they won't, but if there is no protection in the script, they will be able to open the gate.
-
You can only use exports if they are not in a different resource. (correct me if I'm wrong!) and his scripts are in 1 resource. Your thinking of something else, this is how u could use an export: Resource 1: -- This is resource_1 (server.lua) function killHim(who) killPed(who) end -- Meta for resource 1 <meta> <script src="server.lua" type="server" /> <export function="killHim" type="server" /> </meta> -- Resource 2 -- THis is resource 2 addEventHandler("onPlayerJoin",root, function () exports['resource_1']:killHim(source) end )
-
Why the hell,,, you want to set data to each player just to check if its a zombie or not? Zombies most likely have a skin, like the hobo one or something. If thats true in his situation, just let him check the skin and see if its a zombie or not. Way faster and a cleaner code. :3 Zombies can have any skin that there scripted for, and this code isn't really messy...
-
You can also use exports.
-
when a player joins, you can use: setElementData and, for the get you can use: getElementData
-
yea, i could, but im just not sure how it could write the code...
-
hey guys, i made this little spawn script, but im not sure how to find the nearest hospital.. spawnTable = { {1930.0747070313, -1457.0139160156, 26.112157821655, 1984.0969238281, -1469.8690185547, 29.183320999146, 90}, -- LS Brown {1177.4389648438, -1323.1046142578, 14.070738792419, 1218.4992675781, -1323.8115234375, 33.528995513916, -90}, -- LS White {-2650.94140625, 633.86663818359, 14.453125, -2564.9030761719, 563.16589355469, 44.11022567749, 180}, -- SF White {1607.1779785156, 1817.7474365234, 10.8203125, 1589.6560058594, 1859.5609130859, 30.602132797241, 0}, -- LV Main {1371.9439697266, 405.51559448242, 19.7578125, 1350.5229492188, 415.71002197266, 31.090511322021, 90}} -- LV in LS -- create blips function unpackPos() end blip = {} for i,v in ipairs (spawnTable) do local x,y,z,x2,y2,z2,r = unpack(spawnTable[i]) createBlip(x, y, z, 22, 2, 255, 0, 0, 255, 0, 180) end addEventHandler("onPlayerWasted",root, function () local p = source local skin = getElementModel(p) local x,y,z,x2,y2,z2,r = unpack(spawnTable[math.random(#spawnTable)]) fadeCamera(p,false) setTimer( function () setCameraMatrix(p,x2,y2,z2,x,y,z) fadeCamera(p,true) end, 1000, 1 ) setTimer( function () fadeCamera(p,false) setTimer( function () setCameraTarget(p,p) spawnPlayer(p,x,y,z,r,skin) end, 1000, 1 ) end, 4000, 1 ) end )
-
make sure, if you transfered map to LUA, you use: <script src="name.lua" type="client" /> and not <map src="name.lua" type="client" />
-
Im pretty sure this will work... addEventHandler("onResourceStart",resourceRoot, function () for i,veh in ipairs (getElementsByType("vehicle")) do if (getVehicleModelFromName(getVehicleName(veh))==--[[vehicle ID here]]) then setVehicleHandling(veh, "mass", 1500) setVehicleHandling(veh, "turnMass", 4000) setVehicleHandling(veh, "dragCoeff", 2.2) setVehicleHandling(veh, "centerOfMass", { 0, 0.3, -0.15 } ) setVehicleHandling(veh, "percentSubmerged", 85) setVehicleHandling(veh, "tractionMultiplier", 0.7) setVehicleHandling(veh, "tractionLoss", 0.9) setVehicleHandling(veh, "tractionBias", 0.52) setVehicleHandling(veh, "numberOfGears", 5) setVehicleHandling(veh, "maxVelocity", 200) setVehicleHandling(veh, "engineAcceleration", 22) setVehicleHandling(veh, "engineInertia", 5) setVehicleHandling(veh, "driveType", "awd") setVehicleHandling(veh, "engineType", "petrol") setVehicleHandling(veh, "brakeDeceleration", 6) setVehicleHandling(veh, "brakeBias", 0.55) end end end )
-
Make sure the XML is on server side, otherwise the client can just edit his/her jail time. I recommend using MySQL or SQL, because XML can cause server lag, if the file contains to much data.
-
Can you try converting the maps to LUA?
-
I <3 This resource, thank you Remp
-
I belive you can do that, with the "settings" button when you press TAB
-
This isn't the page to request scripts, its to help. You can request scripts here. or, you can try to make the code, but if you get probs, just post code here, and we can help you.
-
Im trying to make a dx text message thing in the center of the screen, but im not sure how to get the colors/text to transfer over: function dxDrawCenteredText(newText,r,g,b) newText = newText or "Failed" r = tonumber(r) or 255 g = tonumber(g) or 0 b = tonumber(b) or 0 if not(isTimer(newDxTimer)) then addEventHandler("onClientRender",root,startCentredText) newDxTimer = setTimer( function () removeEventHandler("onClientRender",root,startCentredText) end, 5000, 1 ) end end addEvent("message:centerText",true) addEventHandler("message:centerText",root,dxDrawCenteredText) function startCentredText() local rx, ry = guiGetScreenSize() dxDrawBorderedText(newText,0, 0, rx, ry, tocolor(r,g,b,255), 5, "sans", "center", "center", false, false, true) end function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) local wh = 4 dxDrawText ( text, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end addCommandHandler("test2", function () dxDrawCenteredText("Testing", 255, 255, 0) end )
-
i tried this, and it does nothing, it looks like we can't cancel this event + i tested it and if im not wrong it doesn't detect client outputChatBox type /debugscript 3 then restart the resource that this code is in, and tell me the error message you got.
