
Baseplate
Members-
Posts
1,417 -
Joined
-
Last visited
Everything posted by Baseplate
-
I need some little help with this code, when I hit the marker, nothing happens. c.lua function startJob() local id = getElementModel(source) if (id == 403) or (id == 515) or (id == 456) then local x, y, z = unpackMarkers() jobMarker = createMarker(x, y, z, "cylinder", 4, 255, 255, 0, 255) jobBlip = createBlipAttachedTo(jobMarker, 41) triggerServerEvent("visibleTruck", getLocalPlayer(), jobMarker, jobBlip) end end addEventHandler("onClientVehicleEnter", root, startJob) addEventHandler("onClientMarkerHit", root, function(hitElement, matchingDimension) if (isPedInVehicle(hitElement)) and (getElementType(hitElement) == "vehicle") and (source == jobMarker) then local car = getElementModel(hitElement) if (car == 403) or (car == 515) or (car == 514) then triggerServerEvent("payTrucker", localPlayer) if isElement(jobMarker) then destroyElement(jobMarker) end if isElement(jobBlip) then destroyElement(jobBlip) end startJob() end end end ) s.lua addEvent("payTrucker", true) addEventHandler ("payTrucker", root, function() money = math.random(350, 1020) givePlayerMoney(source, money) outputChatBox("You succesfully delivered the goods and got $" ..money, source, 0, 255, 0 ) fadeCamera(source, false) setTimer ( fadeCamera, 5000, 1, source, true, 0.5 ) end ) function onlyForMe(marker, blip) setElementVisibleTo(marker, source, true) setElementVisibleTo(marker, getRootElement(), false) -- setElementVisibleTo(blip, source, true) setElementVisibleTo(blip, getRootElement(), false) end addEvent("visibleTruck", true) addEventHandler("visibleTruck", root, onlyForMe)
-
It's SAMP, I dunno why I'm not surprised for doing something such as this...
-
I did use that resource, started it, then all I had to do was getting the localPlayer's element data with onClientRender then it draws the text.
-
Thanks, but it wasn't working fine so I found another way and it works fine now.
-
kifeh n7el port mta3 mta sa
Baseplate replied to hamidoumidou12's topic in Maghrebi Arabic / Darija / الدارجة
Jareb badel 3 bel 2 wella 1. -
5allih 8adi
-
mana3tiwech free resources.
-
Hello everyone, well I tried to make an FPS Calculator and tried to tweak This resource with dxDrawText but it doesn't create any text. Code --Client-side local player = getLocalPlayer() local counter = 0 local starttick local currenttick addEventHandler("onClientRender", root, function() if not starttick then starttick = getTickCount() end counter = counter + 1 currenttick = getTickCount() if currenttick - starttick >= 1000 then dxDrawText(""..counter.."", 898, 689, 1018, 736, tocolor(0, 255, 0, 255), 1.00, "default", "left", "top", false, false, true, false, false) counter = 0 starttick = false end end )
-
I would go with gta-servers.net if I were you.
-
w 3oud posti fard marra.
-
community.multitheftauto.com
-
kifeh n7el port mta3 mta sa
Baseplate replied to hamidoumidou12's topic in Maghrebi Arabic / Darija / الدارجة
forward ports, hedhi tutorial 3maltou ena -
taw tal9ah fi MTA SA Directory-->Server-->Mods-->Deathmatch-->Resources
-
?????
-
Why don't you finish it? for sure we aren't your slaves nor employeed by you, use this function. setVehicleLocked
-
c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin") and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end ) And please next time, if you get such errors just fix it by yourself.
-
Guys, you failed. c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin")) and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end )
-
Mind fucking reading this please? thank you.
-
I dunno, I just deleted the extra ")" from his code, he tested it and it works.
-
Try using a timer on setPedAnimation.
-
lol, deleting this from the meta will make the script work! great thinking, my friend! <!-- gameplay icons --> And this scripts works, except there was an extra ")" near the end of "draw" function. function draw() dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), draw) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
-
John = createPed (skinid, x, y, z) You forgot to add the skin id.
-
@Doom, check out internal.db at the deathmatch folder which is on your server folder, and you can use SQLite browser to browse it.