Jump to content

EW1611

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by EW1611

  1. continua não funcionando, local Marker1 = createMarker (119.86518859863, -1832.1979980469, 5, "cylinder", 1.25, 0, 250, 0, 50) local Marker2 = createMarker (127.06451416016, -1848.4306640625, 5, "cylinder", 3, 0, 250, 0, 50) veh = {} function Vehicle1 ( hitPlayer, getPlayerVehicle ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isElement(Veh1) then destroyElement(Veh1) end local Veh1 = createVehicle(525, 132.57461547852, -1815.671875, 5.795524597168, 0, 0, 270) warpPedIntoVehicle ( hitPlayer, Veh1 ) else outputChatBox ("Você não é um Mecanico", hitPlayer, 0, 0, 0) end end addEventHandler( "onMarkerHit", Marker1, Vehicle1) function Vehicle2 (hitPlayer) if getElementType(hitPlayer) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if getPedOccupiedVehicle(hitPlayer) then destroyElement(veh[hitPlayer]) veh[hitPlayer] = nil else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end end addEventHandler("onMarkerHit", Marker2, Vehicle2)
  2. continua n funcionando '-' local Marker1 = createMarker (119.86518859863, -1832.1979980469, 5, "cylinder", 1.25, 0, 250, 0, 50) local Marker2 = createMarker (127.06451416016, -1848.4306640625, 5, "cylinder", 3, 0, 250, 0, 50) veh = {} function Vehicle1 ( hitPlayer, getPlayerVehicle ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isElement(Veh1) then destroyElement(Veh1) end local Veh1 = createVehicle(525, 132.57461547852, -1815.671875, 5.795524597168, 0, 0, 270) warpPedIntoVehicle ( hitPlayer, Veh1 ) else outputChatBox ("Você não é um Mecanico", hitPlayer, 0, 0, 0) end end addEventHandler( "onMarkerHit", Marker1, Vehicle1) function Vehicle2 ( hitPlayer ) if getElementType( hitPlayer ) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isPedInVehicle( veh[hitPlayer] ) then destroyElement( veh[hitPlayer] ) veh[hitPlayer] = nil else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end end addEventHandler("onMarkerHit", Marker2, Vehicle2) [13:41:59] WARNING: Oficina-Mecanica\spawn.Lua:23: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]
  3. Como poderia verificar se o elemento é player? digo, com ql codigo
  4. esse é o script, a primeira parte, do spawn do veiculo funciona, a segunda ja não local Marker1 = createMarker (119.86518859863, -1832.1979980469, 5, "cylinder", 1.25, 0, 250, 0, 50) local Marker2 = createMarker (127.06451416016, -1848.4306640625, 5, "cylinder", 3, 0, 250, 0, 50) veh = {} function Vehicle1 ( hitPlayer, getPlayerVehicle ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isElement(Veh1) then destroyElement(Veh1) end local Veh1 = createVehicle(525, 132.57461547852, -1815.671875, 5.795524597168, 0, 0, 270) warpPedIntoVehicle ( hitPlayer, Veh1 ) else outputChatBox ("Você não é um Mecanico", hitPlayer, 0, 0, 0) end end addEventHandler( "onMarkerHit", Marker1, Vehicle1) function Vehicle2 (hitPlayer) if isElementWithinMarker(player, Marker2) then player = nil if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isPedInVehicle(veh[player]) then destroyElement(vehicle) else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end end addEventHandler("onMarkerHit", Marker2, Vehicle2) no console aparece isto WARNING: Oficina-Mecanica\spawn.Lua:20: Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got nil]
  5. hi, this is my script, first marker works good, but the second(for destruction) dont work, only the outputChatBox, the marker is on the map, but dont work Edit: on console shows this error: WARNING: Oficina-Mecanica\spawn.Lua:22: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil] WARNING: Oficina-Mecanica\spawn.Lua:21: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] local Marker1 = createMarker (119.86518859863, -1832.1979980469, 5, "cylinder", 1.25, 0, 250, 0, 50) local Marker2 = createMarker (127.06451416016, -1848.4306640625, 5, "cylinder", 3, 0, 250, 0, 50) veh = {} function Vehicle1 ( hitPlayer, getPlayerVehicle ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then if isElement(Veh1) then destroyElement(Veh1) end local Veh1 = createVehicle(525, 132.57461547852, -1815.671875, 5.795524597168, 0, 0, 270) warpPedIntoVehicle ( hitPlayer, Veh1 ) else outputChatBox ("Você não é um Mecanico", hitPlayer, 0, 0, 0) end end addEventHandler( "onMarkerHit", Marker1, Vehicle1) function Vehicle2(player) if isElementWithinMarker(player, Marker2) then if isPedInVehicle(player) == true then destroyElement(veh[player]) veh[player] = nil else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end addEventHandler("onMarkerHit", Marker2, Vehicle2) sorry for my bad english
×
×
  • Create New...