Jump to content

Price.

Members
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Price.

  1. what are the errors? anything in debug?
  2. Price.

    Job [HELP]

    just corrected some signs. local isDx = false local sx,sy = guiGetScreenSize ( ) remainingTimeK = 15 l_tick = getTickCount ( ) local doCountdown = true Jobtable = { {228, 1315.4921875, -898.7529296875, 39.578125}, {228, 1178.515625, -2036.8623046875, 69.0078125}, {228, 2432.904296875, -1584.7587890625, 13.753595352173}, {228, 475.8759765625, -1279.939453125, 16.483493804932}, {228, 2491.4052734375, -2499.5556640625, 13.655031204224}, } weps = { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 38, 16 } function dxInterface ( ) m = remainingTimeK local minutes = 0 while tonumber(m) > 60 do m = m - 60 minutes = minutes + 1 end dxDrawText ( minutes..":"..m, 0, 0, (sx/1.1)+2, (sy/1.1)+2, tocolor ( 0, 0, 0, 255 ), 2.5, 'default-bold', 'center', 'top' ) dxDrawText ( minutes..":"..m, 0, 0, sx/1.1, sy/1.1, tocolor ( 255, 255, 0, 255 ), 2.5, 'default-bold', 'center', 'top' ) if ( getTickCount ( ) - l_tick >= 1000 ) then remainingTimeK = remainingTimeK - 1 l_tick = getTickCount ( ) end end function fetchRandomOnStart_Handler( ) local skin, x, y, z = unpack ( Jobtable[math.random(#Jobtable)] ) ped = createPed ( skin, x, y, z ) blip = createBlipAttachedTo ( ped, 1, 0, 0, 0, 255 ) countdown = setTimer ( deleteTarget, 180000, 1 ) addEventHandler ("onClientPedWasted", ped, PedMoney ) dxInterface ( ) end addEvent ( "onAssStart", true ) addEventHandler ( "onAssStart", root, fetchRandomOnStart_Handler ) function deleteTarget ( ) destroyElement ( ped ) destroyElement ( blip ) killTimer ( countdown ) fetchRandomOnStart_Handler ( ) removeEventHandler ( "onClientPedWasted", ped, PedMoney ) removeEventHandler ( "onClientRender", root, dxInterface ) end function PedMoney ( attacker, attackerweapon, bodypart, loss ) local theTeam = getPlayerTeam ( attacker ) local theWL = getPlayerWantedLevel ( attacker ) local theSkin = getElementModel ( attacker ) for _, v in ipairs ( weps ) do if attackerweapon == v then if getTeamName( theTeam ) == "Criminal" then deleteTarget ( ) givePlayerMoney ( 100 ) end end end end local pedjob = createPed(249, 1721.1484375, -1121.4775390625, 24.085935592651, 180.0) local blipjob = createBlip (1721.1484375, -1121.4775390625, 24.085935592651 , 23, 2, 0, 0, 255, 255, 0, 500) function drawGUIassass( ) if getPlayerTeam ( localPlayer ) ~= getTeamFromName ( "Criminal" ) then showCursor(true) assasswindow = guiCreateWindow(542, 220, 493, 475, "Assassinator Job", false) guiWindowSetSizable(assasswindow, false) guiSetAlpha(assasswindow, 0.97) titleimage = guiCreateStaticImage(10, 20, 473, 99, "images/assass.png", false, assasswindow) descmemo = guiCreateMemo(44, 135, 402, 291, "Be an assassinator and kill famous persons to get money!\n\nDecide carefully if you want to go this way:\nKilling people is illegal and you will get wanted!\n\nAlso make sure that you have got enought ammo.", false, assasswindow) guiSetAlpha(descmemo, 0.93) guiMemoSetReadOnly(descmemo, true) acceptbutton = guiCreateStaticImage(236, 434, 117, 25, "images/assass_ac.png", false, assasswindow) cancelbutton = guiCreateStaticImage(353, 434, 117, 25, "images/assass_ca.png", false, assasswindow) addEventHandler("onClientGUIClick", acceptbutton, startassassjob) addEventHandler("onClientGUIClick", cancelbutton, cancelassassjob) else outputChatBox ( "You are already employed as an Assassinator!" ) end end addEvent ( "assGuiVisible", true ) addEventHandler ( "assGuiVisible", root, drawGUIassass ) function cancelassassjob() guiSetVisible(assasswindow, false) showCursor(false) end function startassassjob() guiSetVisible(assasswindow, false) showCursor(false) triggerServerEvent ( "AssassStart", localPlayer, "team" ) fetchRandomOnStart_Handler ( ) end
  3. Price.

    Job [HELP]

    i already incorrected but there is no timer at all
  4. Price.

    Job [HELP]

    yea waiting answer almost a week and no one can help ?????? also i did that and nothing happens.
  5. Price.

    Help

    set the marker size to 0 as it will be invisible though the script will work all on its own.
  6. Price.

    Job [HELP]

    any help ????!!!!
  7. lel @ den i was gonna do the same thing u did , i just found the paremeters of getElementData was wrong
  8. setElementData ("zombieProof", true), local col = createColRectangle (96, 1788, 184, 145) end addEventHandler("onColShapeHit", function(h)if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end) if there is a problem remove that comma @ setElementData
  9. yea added a comma by mistake for _,v in pairs ( getElementsByType("player")) do local col = createColRectangle (96, 1788, 184, 145) end setElementData ("zombieProof", true) addEventHandler("onColShapeHit", col, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end)
  10. for _,v in pairs ( getElementsByType("player")) do local col = createColRectangle (96, 1788, 184, 145) end setElementData ("zombieProof", true), addEventHandler("onColShapeHit", col, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end)
  11. Price.

    Job [HELP]

    when i start the script and get the job it works fine, now the timer is the problem iam facing, it just keeps counting all by it self unlimited loop
  12. Price.

    Warning

    usually you messed up the arguments inside toggleControl, means they are not right check https://wiki.multitheftauto.com/wiki/ToggleControl
  13. Price.

    [New Map]

    as lekroots said, it will work as he wrote, this should load the Txd and dff to all players, add more txd and dff if you want
  14. Price.

    [New Map]

    download img tool or spark and replace with the current one you got and it will work
  15. oh yes, didn't check the trigger client event correctly, as MIKI said should be like this triggerClientEvent( killer, "onClientZombieWasted", money)
  16. just try it, its gonna be specified for the "account" I have a similar code of police and receiving money.
  17. well if you already made a table and executed it correctly, you have a little mistake, if you want the 0/60 for "ALL" vehicles ofc you need to put them in a table and execute them correctly you executed the table good and everything, but at line 3 veh = createVehicle(418, x, y, z) -- you created a specific vehicle therefor it will only appear for this ID should be veh = createVehicle(vehID, x, y, z) -- in the table define the vehicle IDs first then the x,y,z
  18. well no need to, change line 19 from onPlayerWasted to OnClientPlayerWasted at line 7 addEvent at server side and trigger server event from your client side. would be the following: Client: function drawPanel() dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false) dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) end local drawingPanel = false triggerServerEvent( "InsertYourEventName", localplayer, "sourceEvent") function () if not drawingPanel then drawPanel() drawingPanel = true else drawPanel() drawingPanel = false end end addEventHandler( "onClientPlayerWasted", root, function () if not drawingPanel then drawPanel() drawingPanel = true else drawPanel() drawingPanel = false end end ofc you'll add addEventHandler server side addEvent addEventHandler
  19. Price.

    [New Map]

    what sort of files?
  20. Price.

    Job [HELP]

    can anyone hellp :SS???
  21. uhm try defining the "killer" Client: local attacker = getPlayerName( killer ) local playeraccount = getPlayerAccount ( killer ) ofc you can change local and add it to server side if you want
×
×
  • Create New...