Estevam2d Posted June 2, 2014 Posted June 2, 2014 I have a problem ... I and another player is getting to see the cylinder, is to do just a look? function createPilotTeam () Pilotteam = createTeam ("Caminhoneiro", 99, 155, 144) end addEventHandler ("onResourceStart", resourceRoot, createPilotTeam) function lsjobser () entrega = createVehicle (403, -1834.484, 162.317, 16.086, 0,0,270) carga = createVehicle (450, -1843.175, 162.317, 15.117, 0,0,270) warpPedIntoVehicle(source, entrega) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "Traficante", true ) setPlayerTeam( source, playeraccount ) markerentrega = createMarker (-1748.417, 1.44, 3.555, "cylinder", 2, 255, 0, 0, 255, localPlayer ) setMarkerTarget(markerentrega,3000,0,0, localPlayer ) end addEvent ("fazenda", true) addEventHandler ("fazenda", root, lsjobser) function markerHitLVgate (hitPlayer, matchingDimension) local theVehicle = getPedOccupiedVehicle (hitPlayer) local id = getElementModel(theVehicle) if ((source == markerentrega) or (source == gate2LVmarker)) and (id == 403) then if ((getAccountData (getPlayerAccount (hitPlayer), "flightDestination")) == "LV") then end setTimer(function() destroyElement(markerentrega) destroyElement(entrega) destroyElement(carga) givePlayerMoney (hitPlayer, 3500) outputChatBox ("Entrega feita com sucesso, aqui esta seu $3.500.", hitPlayer, 255, 255, 0) end, 50,1) elseif ((source == markerentrega) or (source == gate2LVmarker)) then outputChatBox ("Não da para voce entregar sem um caminhao o_O", hitPlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", getRootElement(), markerHitLVgate)
xXMADEXx Posted June 2, 2014 Posted June 2, 2014 So.. What exactly do you mean? The Ultimate Lua Tutorial! | MTA PHP SDK
Estevam2d Posted June 2, 2014 Author Posted June 2, 2014 the cylinder is visible to all, should be only for the player who is working.
Mr_Moose Posted June 3, 2014 Posted June 3, 2014 This is a server sided script, localPlayer is not defined and "source" has other issues in case this is triggered from a client, basically try to replace localPlayer and source in that code section you posted with "client" and the marker should be hidden for others. MTA Community | GitHub | 99Stack Forum
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now