Jump to content

roy_ppp

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by roy_ppp

  1. no no i show some code in my script but i just want to ask , How to do marker get element of vehicle 584. Cause when i drag 584 to marker, it not work. ps. i change getElementID to getElementModel now but not work ** sorry for my bad english
  2. This server local target local random function startwork(source, cmd) local playeraccount = getPlayerAccount( source ) if playeraccount then local job = getAccountData(playeraccount, "Data.job") if job == "Oiler" then local name = getPlayerName(source) local cangetnew = getElementData(source, "Cangetnew") if cangetnew ~= false then setElementData(source, "Cangetnew", false) random = math.random(1, 4) if random == 1 then triggerClientEvent("TargetCreate", source, 1937.13, -1772.02, 12.6, name) elseif random == 2 then triggerClientEvent("TargetCreate", source, 999, -897.50, 42.24, name) elseif random == 3 then triggerClientEvent("TargetCreate", source, -91.05, -1169.08, 2.6, name) elseif random == 4 then triggerClientEvent("TargetCreate", source, -1605.80, -2714.51, 48.6, name) end else end end end end addCommandHandler("work", startwork) and client local target local own local blip function CreateTarget(x,y,z, ownn) own = ownn target = createMarker(x,y,z,'checkpoint',2,255,0,0,255) blip = createBlip ( x,y,z,0,3,255,0,0,255) addEventHandler("onClientMarkerHit", target, function(hitPlayer, matchingDimension) local element = getElementType(hitPlayer) outputChatBox("1") if element == "Vehicle" then local model = getElementID(element) outputChatBox("2") if element == 584 then outputChatBox("3") local who = getElementData(element) if who == own then outputChatBox("4") local he = getPlayerFromName(own) local givemoney = math.random(400, 700) outputChatBox("you got " .. givemoney .. " $") givePlayerMoney(own, givemoney) setElementData(own, "Cangetnew", true) destroyElement(blip) destroyElement(target) end end end end ) end addEvent("TargetCreate", true) addEventHandler("TargetCreate", getLocalPlayer(), CreateTarget) end Sorry for late and sorry for my bad english again.
  3. this red marker not work from tank *vehicle id 584* *sorry for my bad english
  4. lol end first if i'm fix now haha but it vehicle account? << Okay i know now how to do next (i'm bad eng sorry @_@)
  5. Thank Markes but it not work lol Have wrong ?
  6. Hi all i'm want ask all function Sk ( source ) local Drive = getElementType ( source ) if Drive == "vehicle" then outputChatBox(Drive) triggerClientEvent( "onGreeting", source) else outputChatBox("Your not drive car !", source, 255,0,0) outputChatBox(Drive) end end addEventHandler("onMarkerHit", mydrop, Sk) Drive == Vehicle but next code function Sk ( source ) f ( getElementType ( source )) == "vehicle" then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local jobanow = getAccountData ( playeraccount, "job.Human") if jobanow == "Dropcar" then outputChatBox(jobanow) local Drive = getElementType ( source ) if Drive == "vehicle" then outputChatBox(Drive) triggerClientEvent( "onGreeting", source) else outputChatBox("Your not drive car !", source, 255,0,0) outputChatBox(Drive) end else outputChatBox("Your not dropcar man", source) end end end addEventHandler("onMarkerHit", mydrop, Sk) Drive is not "vehicle" but it "player" Why (i'm drive car and hit marker)
  7. i not copied I create it manually but i'm just 15 year old Asked the little matter
  8. function onPlaysong( ) local players = getElementType( source ) local x, y, z = getElementPosition( players ) local sound = playSound3D("mysong/ThaiSong.mp3", x, y, z, true) --outputChatBox( x .. " " .. y .. " " .. z .. " ", player) setSoundVolume( sound, 100) end addCommandsHandler("sing", onPlaysong) it's not working has bug ?
  9. Onplayer out save team player onplayer login set team player Anyone help me please. thank you so much.
×
×
  • Create New...