Jump to content

Price.

Members
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Price.

  1. well i need a spawner+ gui so when i press accept i get the job auto + there must be a hooker job team in the tab...
  2. fk it i have hooker job problem now, i need a marker and opens me a gui when i press on the marker and there must be a Hooker team in tab , the problem is when i start blowjob or something like that it doesn't stop i guess i need setTimer i can do that but i need what i have stated above please
  3. now when i press accept nothing happens
  4. the whole scripts before i enter the marker and before i press accept/decline also when i press accept/decline nothing happens help!!
  5. will you just say it? i cant really put anything there D:
  6. uhm iam sorry what do you mean by "shizzle" also same.
  7. now i cant even press decline
  8. Price.

    /updates help

    i already know this but i cant really make it.. all i could make is this if accountname then aclGroupAddObject (aclGetGroup("admin"), "user.")) if accountname then aclGroupAddObject (aclGetGroup("admin"), "user.")) UpdatesMain = {} GUIEditor = { scrollbar = {} } Updates = {} Close = {} addEventHandler("onClientResourceStart", resourceRoot, function() UpdatesMain.window = guiCreateWindow(265, 82, 726, 551, "Updates", false) guiWindowSetSizable(UpdatesMain.window, false) Close.button = guiCreateButton(540, 465, 150, 70, "Close", false, UpdatesMain.window) Updates.memo = guiCreateMemo(9, 64, 707, 381, "", false, UpdatesMain.window) GUIEditor.scrollbar[1] = guiCreateScrollBar(693, 74, 23, 375, true, false, UpdatesMain.window) end ) function updates(theplayer, command, console) outputChatBox("Failed to Open Updates") end addCommandHandler("update",updates)
  9. Price.

    /updates help

    guys i'am not good at this stuff but i need to make /updates command gets me a gui or whatever tells me the server updates and 2 ACL groups are allowed to edit the updates so will you please tell me how?
  10. dunno maybe, can you tell me the solution please?
  11. guys this is a carjacker job, the problem is when you go into the marker it says accept/decline if i pressed accept nothing happens could you a help me please? Client sided: sx,sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) window = guiCreateWindow(211,175,356,276,"Car Jacker",false) takebutton = guiCreateButton(76,248,71,14,"Accept",false,window) cancbutton = guiCreateButton(209,248,71,14,"Decline",false,window) label1 = guiCreateLabel(13,23,334,147,"Delivery Man.\nAs a deliver man\nYou need to deliver packages\nOnce you got the job, get in a Burrito.\n\n\nFor every package you deliver, you get:\n\n- Cash\n",false,window) guiLabelSetColor(label1,255,255,255) guiLabelSetVerticalAlign(label1,"top") guiLabelSetHorizontalAlign(label1,"left",false) guiSetFont(label1,"default-bold-small") label2 = guiCreateLabel(38,211,274,16,"If you click accept you will lose your current job!",false,window) guiLabelSetColor(label2,255,0,0) guiLabelSetVerticalAlign(label2,"top") guiLabelSetHorizontalAlign(label2,"left",false) guiSetFont(label2,"default-bold-small") guiWindowSetSizable(window, false) guiSetVisible(window,false) marker = createMarker(2394,-1242,23.5,"cylinder",2,170,30,0) theMarker = createMarker(0,0,-50,"cylinder",5,170,30,0) blip = createBlipAttachedTo(marker,56) addEventHandler("onClientMarkerHit",marker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(window,true) showCursor(true) end end) addEventHandler("onClientGUIClick",window, function(b) if b == "left" then if source == takebutton then if getElementData(lp,"job") ~= "Carjacker" then triggerServerEvent("haveCarJob",lp) end elseif source == cancbutton then guiSetVisible(window,false) showCursor(false) end end end) addEvent("haveCarJob",true) function havejob(x,y) setElementPosition(theMarker,0,0,-50) outputChatBox("There is a vehicle available in "..getZoneName(x,y,0).."! Go and Find it!",255,0,0) end addEventHandler("haveCarJob",root,havejob) addEvent("carJack",true) function jackIt(x,y) outputChatBox("There is a vehicle available in "..getZoneName(x,y,0).."! Go and find it!",255,0,0) end addEventHandler("carJack",root,jackIt) addEventHandler("onClientVehicleStartEnter",root, function(p) if p == lp then if getElementData(source,"jack") and getElementData(lp,"job") ~= "Carjacker" then outputChatBox(""..getPlayerName(source).." has entered the vehicle!",255,0,0) end end end) addEvent("carJackSomeoneEntered",true) function someoneEntered() outputChatBox("Deliver the car to the buyer marked on your map!",255,0,0) end addEventHandler("carJackSomeoneEntered",root,someoneEntered) addEvent("carJackYouEntered",true) function IEntered(x,y,z) setElementPosition(theMarker,x,y,z) if not theBlip then theBlip = createBlipAttachedTo(theMarker,41) end outputChatBox("Deliver the car to the buyer marked on your map!",255,0,0) end addEventHandler("carJackYouEntered",root,IEntered) addEventHandler("onClientMarkerHit",theMarker, function(p) if p == lp and getElementData(lp,"job") == "Carjacker" and getElementData(getPedOccupiedVehicle(lp),"jack") then triggerServerEvent("carJackDeliver",lp) end end) addEvent("carJackDeliver",true) function deliver() if theBlip then destroyElement(theBlip) end outputChatBox(""..getPlayerName(source).." has delivered the vehicle!",255,0,0) end addEventHandler("carJackDeliver",root,deliver) bindKey("num_add","down",function() x,y,z = getElementPosition(lp) rz = getPedRotation(lp) outputChatBox(tostring(math.ceil(x))..","..tostring(math.ceil(y))..","..tostring(math.ceil(z))..","..tostring(math.ceil(rz))) veh = createVehicle(602,x,y,z,0,0,rz) setElementInterior(veh,15) end) Server Sided: routes = {{1137,-1033.6,32,270},{2860,-1908,11,180}} garages = {{1644,-1521,13}} vehicle = createVehicle(602,0,0,-50) theMarker = createMarker(0,0,-50,"arrow",2,255,0,0,255,getTeamFromName("Criminals")) attachElements(theMarker,vehicle,0,0,4) setElementData(vehicle,"jack",true) attached = 1 function reAttach() if attached == 1 then attachElements(theMarker,vehicle,0,0,3.9) elseif attached == 2 then attachElements(theMarker,vehicle,0,0,3.) elseif attached == 3 then attachElements(theMarker,vehicle,0,0,3.7) elseif attached == 4 then attachElements(theMarker,vehicle,0,0,3.6) elseif attached == 5 then attachElements(theMarker,vehicle,0,0,3.5) elseif attached == 6 then attachElements(theMarker,vehicle,0,0,3.4) elseif attached == 7 then attachElements(theMarker,vehicle,0,0,3.5) elseif attached == 8 then attachElements(theMarker,vehicle,0,0,3.6) elseif attached == 9 then attachElements(theMarker,vehicle,0,0,3.7) elseif attached == 10 then attachElements(theMarker,vehicle,0,0,3.) elseif attached == 11 then attachElements(theMarker,vehicle,0,0,3.9) elseif attached == 12 then attachElements(theMarker,vehicle,0,0,4) end if attached < 12 then attached = attached+1 else attached = 1 end end setTimer(reAttach,50,0) addEvent("haveCarJob",true) function haveBusJob() setElementData(source,"job","Carjacker") triggerClientEvent(source,"haveCarJob",root,TheX,TheY) end addEventHandler("haveCarJob",root,haveBusJob) function setCar() timer = 600 pos = math.random(1,table.maxn(routes)) disx = math.random(-150,150) disy = math.random(-150,150) for i,posi in ipairs(routes) do if i == pos then for a,z in ipairs(posi) do if a == 1 then x = z elseif a == 2 then y = z elseif a == 3 then setElementPosition(vehicle,x,y,z) triggerClients(x,y,z,disx,disy) elseif a == 4 then setElementRotation(vehicle,0,0,z) end end end end fixVehicle(vehicle) setElementHealth(vehicle,2000) end setTimer( function() timer = timer-1 if timer == 0 then setCar() end end,1000,0) function triggerClients(x,y,z,a,b) x = x+a y = y+b theX = x theY = y for i,p in ipairs(getElementsByType("player")) do if getElementData(p,"job") == "Carjacker" then triggerClientEvent(p,"carJack",p,x,y) end end end setTimer(setCar,900,1) addEventHandler("onVehicleStartEnter",root, function(p) if source == vehicle then if getElementData(p,"job") ~= "Carjacker" then setVehicleLocked(vehicle,true) else setVehicleLocked(vehicle,false) timer = 600 end end end) addEventHandler("onVehicleEnter",root, function(p) if source == vehicle then if getElementData(p,"job") ~= "Carjacker" then removePedFromVehicle(p) else theGarage = math.random(1,table.maxn(garages)) for i,garage in ipairs(garages) do if i == theGarage then for a,e in ipairs(garage) do if a == 1 then x = e elseif a == 2 then y = e elseif a == 3 then z = e end end end end for i,player in ipairs(getElementsByType("player")) do if player ~= p then triggerClientEvent(player,"carJackSomeoneEntered",p) else triggerClientEvent(player,"carJackYouEntered",p,x,y,z) end end end end end) addEvent("carJackDeliver",true) function deliver() money = math.random(0,3000) for i,player in ipairs(getElementsByType("player")) do if getElementData(player,"job") == "Carjacker" then money = money+1000 triggerClientEvent(player,"carJackDeliver",source) end end givePlayerMoney(source,money) removePedFromVehicle(source) setTimer(setElementPosition,300,1,vehicle,0,0,-50) setElementVelocity(vehicle,0,0,0) setTimer(setCar,3000,1) end addEventHandler("carJackDeliver",root,deliver)
  12. If anyone would tell me the code to make a gui and to join criminal team auto would be find guys
  13. here is the vehicle defination: local theVehicle = getPedOccupiedVehicle ( thePlayer ) if (theVehicle) then local vehicleData = getElementData(theVehicle,"destroyed") local playerData = getElementData(thePlayer,"destroyed") if (vehicleData == 1) and (playerData == 1) then destroyElement(theVehicle) destroyElement(vehicleToStealBlip) givePlayerMoney(thePlayer, math.random(1000,1500)) setElementData(thePlayer, "destroyed", 0) end
  14. i've tried this code but didnt work also addEventHandler ( 'onPlayerQuit', root, function ( ) if ( isElement ( theVehicle )) then destroyElement ( theVehicle ) end end )
  15. omg it ain't that hard i need help in destroying a vehicle when i log out !!!!
  16. idk but i just need the code to get the vehicle destroyed when i quit no errors atm but i need code to make vehicle destroyed when i log out .
  17. guys blip is fixed but i need proper code to get the vehicle destroyed when i log out or reconnect
  18. Guys i need a little help when i reconnect gives me this error 56:Bad Argument @ 'getElementData' [Expected element at argument 1 ,got nill] 58:Bad Argument @ 'destroyerElement' [Expected element at argument 1 ,got nill] the function: function playerQuit() local playerAcc = getPlayerAccount(source) if ( playerAcc ) then getElementData(theVehicle,"destroyed") getElementData(thePlayer,"destroyed") destroyElement(theVehicle) destroyElement(vehicleToStealBlip) end end addEventHandler("onPlayerQuit", getRootElement(), playerQuit) addEventHandler("onPlayerLogout", getRootElement(), playerQuit) i want him, when he joins the blip is destroyed and the vehicle is destroyed too but only blip gets destroyed EDIT: i've removed getElementData(theVehicle,"destroyed") getElementData(thePlayer,"destroyed") Now tells me 56:Bad argument @ 'destroyerElement' [Expected element at argument 1, got nill]
×
×
  • Create New...