Tete omar Posted June 8, 2012 Posted June 8, 2012 spawnX, spawnY, spawnZ = 834.28607177734, -2019.8114013672, 12.8671875 local Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then spawnPlayer(source, spawnX, spawnY, spawnZ) outputChatBox("You've been spawned", source) end end) It doesn't work i want a simple marker when the player hit, simply spawn on an area TAPL isn't allowed to reply here
GTX Posted June 8, 2012 Posted June 8, 2012 (edited) spawnX, spawnY, spawnZ = 834.28607177734, -2019.8114013672, 12.8671875 Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then spawnPlayer(hitPlayer, spawnX, spawnY, spawnZ) outputChatBox("You've been spawned") end end) Edited June 8, 2012 by Guest
Guest Guest4401 Posted June 8, 2012 Posted June 8, 2012 spawnPlayer is serverside function only. Server: local spawnX, spawnY, spawnZ = 834.28607177734, -2019.8114013672, 12.8671875 local Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) addEventHandler('onMarkerHit', Marker, function(hitPlayer) spawnPlayer(hitPlayer, spawnX, spawnY, spawnZ) outputChatBox("You've been spawned", hitPlayer) end )
Tete omar Posted June 8, 2012 Author Posted June 8, 2012 local Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) function galgal(hitPlayer) if (hitPlayer == localPlayer) then spawnPlayer(source, 2494.6000976563, -1692.5, 25.39999961853) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You've been spawned into this area", source) end end addEventHandler('onClientMarkerHit', Marker, galgal) how about it ?
Guest Guest4401 Posted June 8, 2012 Posted June 8, 2012 local Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) function galgal(hitPlayer) if (hitPlayer == localPlayer) then spawnPlayer(source, 2494.6000976563, -1692.5, 25.39999961853) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You've been spawned into this area", source) end end addEventHandler('onClientMarkerHit', Marker, galgal) how about it ? I already told you that spawnPlayer is serversided and onClientMarkerHit is clientsided so both can't be in one place. To add on, I also gave you the code. Did you try it? Server: local spawnX, spawnY, spawnZ = 834.28607177734, -2019.8114013672, 12.8671875 local Marker = createMarker ( -709.27990722656, 960.32800292969, 11.449862480164, "cylinder", 1.29999995, 255, 255, 255, 255 ) addEventHandler('onMarkerHit', Marker, function(hitPlayer) spawnPlayer(hitPlayer, spawnX, spawnY, spawnZ) outputChatBox("You've been spawned", hitPlayer) end )
myonlake Posted June 8, 2012 Posted June 8, 2012 @ karthik_184 ikr Do not mix server-side and client-side, they're both really different things and they do different things.
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