-
Posts
575 -
Joined
Everything posted by codeluaeveryday
-
What I said makes sense is a complex way. It could only be understood by someone from Australia, United Kingdom or the United States of America.
-
Simple, find the 'Default' ACL. Add this to the 'Default' ACL: Now either create a new ACL and GROUP for this or use an existing one. I will add this to the ADMIN ACL. Now this will block their messages.
-
Remove the zone lua file and place it in a new resource. Just create a new resource with the .lua file.
-
Just to let you know, this sound is playing to everyone. If I logged in everyone would hear the sound.
-
{9MoD} for sell Group-System V1.1 by ahmedfef [same cit2]
codeluaeveryday replied to ahmedfef's topic in Resources
@Ahmed, they are trying to say, you have made a very similiar script to GTA-AR Deathmatch, and CIT 2. I know GTA-AR stole the idea from CIT. I played CIT when it first came out and can verify this. If CIT jumped off a bridge, would you jump off a bridge? -
testWindow is not defined, returning false. @Manve, I started off by making a speed booster using the mouse scroll.
-
This is a server sided code and does everything you wanted.
-
So you want a gate which moves every once and awhile? -- Settings gPosX = 1225.944 -- Gate Position X gPosY = 1000 -- Gate Position Y gPosZ = 1000 -- Gate Position Z gRotX = 0 -- Gate Rotation X gRotY = 0 -- Gate Rotation Y gRotZ = 0 -- Gate Rotation Z gateSpeed = 1000 -- How long it takes the gate to move from point A to point B gateID = 969 -- Defaults gate = createObject(gateID, gPosX, gPosY, gPosZ, gRotX, gRotY, gRotZ) setTimer( function() moveObject(gate, gateSpeed-100, gPosX, gPosY, gPosZ+4) setTimer(moveObject, gateSpeed+1000, 1, gate, gateSpeed-100, gPosX, gPosY, gPosZ) end, gateSpeed+1000, 0)
-
WTF Castillo, you didn't even help him and you said 'your welcome'? I'm trolled...
-
If you explain a bit more I can help out. They either use markers or colshapes, but markers are colshapes. If you wish to disable them simply destroy all colshapes and markers. Also, this is an element: getElementsByType('race-pickup') This could help ^^
-
Ok, so it's kind of simple, the fromJSON function is meant to convert json formatted strings to tables aight? well it's not working for me. I called an API and returned a JSON formatted string, well when I use fromJSON it returns nil. Example String downloaded: {"data":{"detections":[{"language":"es","isReliable":false,"confidence":0.4517133956386293},{"language":"pt","isReliable":false,"confidence":0.08356545961002786}]}} returns : Nil I am going to be comparing the confidence, I even worked on my own parser, failed and I want to quit life. Care to explain how this isn't working.
-
[TUT] Join Country - Revamped Scripting (Admin is outdated)
codeluaeveryday replied to codeluaeveryday's topic in Tutorials
Max, dude the code is organized, its very organized, it's because the [lua] box is too small to display the code. -
[TUT] Join Country - Revamped Scripting (Admin is outdated)
codeluaeveryday replied to codeluaeveryday's topic in Tutorials
Thanks guys, and omg... I didn't know they updated the IP tables, but they will go out of date sooner or later. -
bodypartImage = { [3] = 'torso.png', [4] = 'ass.png', [5] = 'leftarm.png', [6] = 'rightarm.png', [7] = 'leftleg.png', [8] = 'rightleg.png', [9] = 'head.png', } addEventHandler('onClientPlayerWasted', getRootElement(), function(killer, weapon, bodypart) if(getElementType(attacker) == 'player') then screenX, screenY = guiGetScreenSize() width = 350 height = 348 image = guiCreateStaticImage((screenX/2)-(width/2), (screenY/2)-(height/2), width, height, bodypartImage[bodypart], false) setTimer(destroyElement, 3000, 1, image) end end)
-
Try this: polesToFix = { {1332.9365234375, -1411.30078125, 12}, {1470.1435546875, -1447.119140625, 12}, {1515.50390625, -1586.787109375, 12}, {1544.9814453125, -1726.63671875, 12}, {1460.6865234375, -1420.0810546875, 12}, {1863.583984375, -1255.1982421875, 12}, {2061.3095703125, -1289.392578125, 22.5}, {1862.3125, -1455.162109375, 12.2} } local markerjob = createMarker( 733.13671875, -1347.9580078125, 13.510824203491, "Cylinder", 1.5, 0, 0, 255, 150) local skins = {"Electrician (skin: 16)"} windowjob = guiCreateWindow(0.700,0.28,0.2800,0.4500,"Electrician job",true) guiSetVisible(windowjob, false) infomemo = guiCreateMemo(0.0347,0.0600,0.9369,0.4100,"As an electrician, you will go around the city of Los Santos, to the red flag, and fix the poles.",true,windowjob) skinsgrid = guiCreateGridList(0.0347,0.5300,0.9369,0.350,true,windowjob) guiGridListSetSelectionMode(skinsgrid,2) _skins = guiGridListAddColumn(skinsgrid,"Skins",0.95) takebtn = guiCreateButton(0.1000,0.9000,0.3000,0.0700,"Accept",true,windowjob) closebtn = guiCreateButton(0.6000,0.9000,0.3000,0.0700,"Cancel",true,windowjob) infolbl = guiCreateLabel(0.2681,0.4800,0.4637,0.0538,"Choose your skin :",true,windowjob) guiLabelSetColor(infolbl,255,255,255) guiLabelSetVerticalAlign(infolbl,"center") guiLabelSetHorizontalAlign(infolbl,"center",false) guiSetFont(infolbl,"default-bold-small") local resX, resY = guiGetScreenSize() local width2, height2 = 1269, 75 local X2 = resX / 2 - width2 / 2 local Y2 = resY / 2 - height2 / 2 jobs_electitian_label_timeLeft = guiCreateLabel(X2, Y2, width2, height2, "Time until finished: ", false) guiSetPosition(jobs_electitian_label_timeLeft, 10, 10, false) guiSetVisible(jobs_electitian_label_timeLeft, false) guiSetFont(jobs_electitian_label_timeLeft, "sa-header") guiLabelSetColor(jobs_electitian_label_timeLeft, 5, 221, 35) guiLabelSetHorizontalAlign(jobs_electitian_label_timeLeft, "center", false) guiLabelSetVerticalAlign(jobs_electitian_label_timeLeft, "center") for index, skin in ipairs(skins) do local row = guiGridListAddRow (skinsgrid) guiGridListSetItemText(skinsgrid, row, _skins, tostring(skin), false, false) end addEventHandler("onClientGUIClick", root, function () if (source == takebtn) then local row,col = guiGridListGetSelectedItem(skinsgrid) if (row and col and row ~= -1 and col ~= -1) then local skinName = guiGridListGetItemText(skinsgrid, row, 1) if skinName == "Electrician (skin: 16)" then triggerServerEvent("electrition:takeJob",localPlayer, 16) end guiSetVisible ( windowjob, false ) showCursor ( false ) else outputChatBox("Please,select a skin of the list.",255,0,0) end elseif (source == closebtn) then guiSetVisible ( windowjob, false ) showCursor ( false ) end end) function Elecjob(hitElement, dimension) if (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerjob, Elecjob) function Elecjobleave(leaveElement, dimension) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", markerjob, Elecjobleave) function removeElecWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", closebtn , removeElecWindow, false) function createPoleMarkerAndBlip() if getElementType(source) ~= 'player' then if getElementData(localPlayer, "Occupation") == "Electrician" and getElementType(localPlayer) == 'player' then part = math.random(1, #polesToFix) x = polesToFix[part] y = polesToFix[part] z = polesToFix[part] electritionPoleMarker = createMarker(x, y, z, "cylinder", 3, 200, 200, 0, 85, localPlayer) setElementData(electritionPoleMarker, "Electrician", "poleMarker", true) electritonPoleBlip = createBlip(x, y, z, 19) end end if getElementData(source, "Occupation") == "Electrician" and getElementType(source) == 'player' then part = math.random(1, #polesToFix) x = polesToFix[part] y = polesToFix[part] z = polesToFix[part] electritionPoleMarker = createMarker(x, y, z, "cylinder", 3, 200, 200, 0, 85, source) setElementData(electritionPoleMarker, "Electrician", "poleMarker", true) electritonPoleBlip = createBlip(x, y, z, 19) end end addEvent("electrition:createPoles", true) addEventHandler("electrition:createPoles", root, createPoleMarkerAndBlip) addEventHandler("onClientPlayerJoin", root, createPoleMarkerAndBlip) addEventHandler("onClientResourceStart", root, createPoleMarkerAndBlip) addEventHandler("onClientMarkerHit", electritionPoleMarker, function(player, dimension) if isPlayerInVehicle ( player ) or ( doesPlayerHaveJetPack ( player ) ) then outputChatBox("Get out of the vehicle, to fix the pole.", 255, 0, 0) return end if source == electritionPoleMarker and player == localPlayer and getElementData(player, "Occupation") == "Electrician" then setElementFrozen(localPlayer, true) showCursor(true) guiSetVisible(jobs_electitian_label_timeLeft, true) triggerServerEvent("electrain:fixPole:animation", localPlayer) guiSetText(jobs_electitian_label_timeLeft, "Time Left: 20") setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 19") end, 1000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 18") end, 2000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 17") end, 3000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 16") end, 4000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 15") end, 5000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 14") end, 6000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 13") end, 7000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 12") end, 8000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 11") end, 9000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 10") end, 10000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 9") end, 11000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 8") end, 12000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 7") end, 13000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 6") end, 14000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 5") end, 15000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 4") end, 16000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 3") end, 17000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 2") end, 18000, 1) setTimer(function() guiSetText(jobs_electitian_label_timeLeft, "Time Left: 1") end, 19000, 1) startTimerWhenMarkerHit = setTimer(function() destroyElement(electritonPoleBlip) destroyElement(electritionPoleMarker) triggerEvent("electrition:createPoles", localPlayer) triggerServerEvent("electrition:fixPole", localPlayer) showCursor(false, false) setElementFrozen(localPlayer, false) guiSetVisible(jobs_electitian_label_timeLeft, false) end, 20000, 1) end end ) Let me know if there are errors.
-
Are you using slothmans zombies resource? If so, you might be having a small bug with your server and not the resource. It happened to me awhile ago forcing me to close my servers, 1 year later I discovered a cure. Steps - MAKE SURE YOUR SERVER IS SHUTDOWN 1) Navigate to your: server/mods/deathmatch folder 2) Now go to the 'resource-cache' folder. 3) Delete the contents of 'http-client-files', or just go into that folder and look for your zombie mod, and delete that folder. 4) Start the server == Done.
-
They said that Handling would not be possible. Remember this: What ever can be done in GTA:SA, more can be done in MTA:SA. Someone needs to work on a patch to parse the cleo files and then we can have a function for it like: test = loadCleoMod('file.cleo') unloadCleoMod(test) Do not say its impossible! Impossible is a terrible word, believe.
-
[MTA:SA-P.I.D.C] MAX DUST SHADER EFFECT !!!! TEST
codeluaeveryday replied to undifine0909's topic in Media
Use bandicam, I have brought bandicam and love it, plus you won't be able to find the updated bandicam torrents, no one has cracked them. Its why I buy my software, so it can be updated. Bandicam has a good compression ratio and can record HD. -
I finished the code sometime ago, found obvious bugs as I went through it, it pretty much works, I am probably gonna host it soon, I like the whole code itself, it's fun to play and all, but yeah... It still has one bug I need to fix. Overall I've added features and fixed most of them. Great script 5/5.
-
Your welcome Cassandra.
-
There is an MTA:SA bug if you instantly spawn after death, it can bug and spawn you at 0, 0, 0. The game needs a few seconds to process the players location and a few other things, this is why GTA:SA doesn't have instant respawn. Wish they would fix it.
-
Your way and DNL's is ineffective and can cause lag on the server, use this code: SERVER ONLY: -------------------------------------------------------------------- --* Command vh respawn system *------------------------------------- --* main_s.lua *---------------------------------------------------- --* Made by kimmis *------------------------------------------------ --* Do not remove this box *--------------------------------- -------------------------------------------------------------------- function respawn() outputChatBox("***Respawning ALL Empty Vehicles In 10 Secs, get to your car to keep it***") setTimer(function() local vehicles = getElementsByType ( "vehicle" ) for k, vehicle in ipairs ( vehicles ) do if checkEmpty( vehicle ) then local seats = getVehicleMaxPassengers(vehicle) resetVehicleIdleTime ( vehicle ) respawnVehicle ( vehicle ) end end end, 10000, 1) end setTimer(respawn, 600000, 0) function checkEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
-
Cadu take a joke, I'm literally an anti-hacker, people which hack on this game manage to fail while vssing me. I have been playing MTA: Race for a long itme and mta deathmatch gamemode and basemode. I do not want that hack at all, still I doubt hacks work.
-
Just a note: Not many scripters will make this for you, I recommend you try learning from the code I make.
-
If it was to show all maps it would go past the screen size, unless there is a scroll bar added. I recommend you make your own GUI for changing maps. When I get home I'll work on a script for you. For the mean time just hang in there.