Jump to content

bamby12

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by bamby12

  1. is mta paradise going to ruin the mta community now?
  2. To be honest Snake neither do i EDIT: sorry i see youve edited it abit... ill test it now and reply here how it goes. EDIT: Thanks Snake it works now anything i can do for you just pm me.
  3. ok here it is: addEvent("robstart", true) bankrob = {} function rob (thePlayer) if isTimer(robbank) then outputChatBox ("Somebody is allready robbing the bank", player, 255, 0, 0, false) else outputChatBox ("***All Police To The Bank Somebody is Robbing The Bank*** ", getRootElement(), 255, 0, 0, false) setPlayerWantedLevel ( source, 4 ) robbank = setTimer( robb, 10000, 1 ) end end addEventHandler ( "robstart", getRootElement(), rob ) function robb (thePlayer) givePlayerMoney ( thePlayer, math.random(50000, 100000) ) setPlayerWantedLevel ( thePlayer, 6 ) end p.s i made a gui for it that works aswell but the only thing that wont work is the give money and set wanted level under the robb runction.
  4. i made a timer that works fine to call the function, if you understand what i mean
  5. nahh that did not work either, the acctual error is: warning rob.lua:17: Bad argument @ 'givePlayerMoney' EDIT: any more ideas guys please...
  6. Ok so i got it sorted i decided to make a gui for it instead...but still have 1 problem, function robb (thePlayer) givePlayerMoney ( source, math.random(50000, 100000) ) setPlayerWantedLevel ( source, 6 ) end i get an error saying bad player pointer or something and the player dosnt get the cash or the stars?? - But i know that the timer is stated because of the output chatbox.
  7. why how will that help??? somebody please fix this i know its possible.
  8. yeahh thats what i did and it dosent work at all anybody got anymore ideas?? EDIT: cmon guys please help i need this.
  9. hmm i cant see where i put the interior when i put the coordinates of the marker thats why i put it in interior 3 i took away the dimension and it still didnt show up, ok so i edited and i still cant see it, the marker shout be in interior 3 with the coordinates i gave but it isnt.
  10. yeahh i set it to interior 3 because thats where i want it inside the bank... and also i set the dimension just in case i had too EDIT: holy shizza didnt know i set the dimention to 3 ill remove it and test now...
  11. i found this on an earlier topic and tried editing...but the marker dosent even show up, any ideas? function robmarkersetup() robmarker = createMarker (359.31210327148, 161.29792785645, 1008.382812, "cylinder", 4.5, 255, 0, 0, 128, getRootElement()) setElementInterior (robmarker, 3) setElementDimension (robmarker, 3) end addEventHandler("onResourceStart", getRootElement(), robmarkersetup) function bankrob (hitPlayer, matchingDimension) if (source == robmarker) then if isTimer(robbank) then cancelEvent() outputChatBox("The Bank Is Allready Being Robbed", hitPlayer, 255, 255, 0) else outputChatBox ("****BANK ROB****", hitPlayer, 255, 0, 0, false) outputChatBox ("Press X To Rob The Bank!", hitPlayer, 255, 0, 0, false) outputChatBox ("You Must Wait Here And Not Die To Get The Cash!", hitPlayer, 255, 0, 0, false) bindKey (hitPlayer, "x", "down", rob) end end end addEventHandler("onMarkerHit", getRootElement(), bankrob) bankrob = {} function rob (thePlayer, key, keystate) if (key == "x") and (keystate == "down") then outputChatBox ("***All Police To The Bank "..getPlayerName ( thePlayer ).. " Is Robbing The Bank*** ", getRootElement(), 255, 0, 0, false) setPlayerWantedLevel ( thePlayer, 4 ) robbank = setTimer( robb, 100000, 1 ) end end function robb (thePlayer) if (source ~= robmarker) then return else givePlayerMoney ( thePlayer, math.random(50000, 100000) ) setPlayerWantedLevel ( thePlayer, 6 ) end end function death() killTimer( robbank ); end addEventHandler ( "onPlayerWasted", getRootElement(), death ) i would like it so when the player steps into the marker and presses x if there is not another player allready robbing the bank then it will start the robb timer and then the player will get some money at the end of the timer then it starts again, unless they die or get arrested or something.
×
×
  • Create New...