isa_Khamdan Posted July 10, 2013 Share Posted July 10, 2013 how can I fix it? local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial(player) == theSerial then and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) end end end end,false ) addEventHandler('onClientMarkerHit',theMarker, function(player) if (getPlayerSerial(player)~="0396C6F543425FFE37A326883D73B4F4")then cancelEvent() r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) else r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) end end end) Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial( ) == theSerial then and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end end,false ) Client Link to comment
فاّرس Posted July 10, 2013 Share Posted July 10, 2013 local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial( ) == theSerial then and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end end,false ) Client then and not ? Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial( ) == theSerial then and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end end,false ) Client Not working. Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial( ) == theSerial and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end end,false ) Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial( ) == theSerial and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'WHAT EVER',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end end,false ) still not working Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 What about setting it for player names instead of serial? Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 As far as i know the on i gave it should work as it should! local theName = "iFahad" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer and getPlayerName ( hit ) == theName then setElementPosition( hit , 2253.50, 589.58, 10.66 ) outputChatBox ( 'Hello Hit!',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) else outputChatBox ( 'For Hit!',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) end end,false ) Change the name! and add color codes if there's! Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 (edited) can you fit cancelEvent with the code? cancelEvent() r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) else r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) Edit: in the code you gave me ===Edit: the marker shows up but it don't change my position. Edited July 10, 2013 by Guest Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 No You CAN'T Cancel the event! Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 No You CAN'T Cancel the event! it doesn't work only the markers shows up. Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 it should work client. i'll test it again Link to comment
isa_Khamdan Posted July 10, 2013 Author Share Posted July 10, 2013 it works but the message show for everyone in the chat also I want to know how to make two messages one for the people who are allowed to use the marker and another one for the people who can't use it Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 It'll show for the player how hit the marker! Link to comment
فاّرس Posted July 10, 2013 Share Posted July 10, 2013 In the outputChatBox : outputChatBox ( 'text',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) change to : outputChatBox ( 'text',hit,math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) Link to comment
iPrestege Posted July 10, 2013 Share Posted July 10, 2013 In the outputChatBox : outputChatBox ( 'text',math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) change to : outputChatBox ( 'text',hit,math.random ( 255 ),math.random ( 255 ),math.random ( 255 ) ) It's client dear the best please read the wiki KILL ME ! Link to comment
فاّرس Posted July 10, 2013 Share Posted July 10, 2013 Ops i'm do not see that . And come to me and i'll kill you Link to comment
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