Jump to content

plzhelp


[S.K]

Recommended Posts

what is wrong here

marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
  
addEventHandler("onClientMarkerHit",marker, 
function() 
    local vh = getPedOccupiedVehicle ( source ) 
    vehicles = ( 217, 499 ) 
    nm = tonumber ( math.random( #vehicles ) ) 
    setElementModel ( vh, nm )   
end) 

Link to comment
  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

what is wrong here
marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
  
addEventHandler("onClientMarkerHit",marker, 
function() 
    local vh = getPedOccupiedVehicle ( source ) 
    vehicles = ( 217, 499 ) 
    nm = tonumber ( math.random( #vehicles ) ) 
    setElementModel ( vh, nm )   
end) 

[lua] [lua]marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0)

The wrong is the bad explanation , what are you trying to do ?

Link to comment
marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
vehicles = (217, 499) 
  
addEventHandler("onClientMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and player == localPlayer then 
          local vh = getPedOccupiedVehicle(player) 
          if vh then 
               setElementModel(vh, math.random(#vehicles)) 
          end 
     end 
end) 

Link to comment

ok tell what is wrong at this

function createaMarker () 
 createMarker (1948.5617675781, -1711.0710449219, 13.546875,) 
end 
addEventHandler("onClientResourceRoot", root, createaMarker) 
 function guiSetOn () 
 guiSetVisible(youWindowVariableHere, true) 
 showCursor(true) 
end 
addEventHandler("onClientMarkerHit", root, guiSetOn) 

Link to comment
ok tell what is wrong at this
function createaMarker () 
 createMarker (1948.5617675781, -1711.0710449219, 13.546875,) 
end 
addEventHandler("onClientResourceRoot", root, createaMarker) 
 function guiSetOn () 
 guiSetVisible(youWindowVariableHere, true) 
 showCursor(true) 
end 
addEventHandler("onClientMarkerHit", root, guiSetOn) 

marker = createMarker(1948.5617675781, -1711.0710449219, 13.546875) 
  
addEventHandler("onClientMarkerHit", marker, 
function(player) 
     if player == localPlayer then 
          guiSetVisible(youWindowVariableHere, true) 
          showCursor(true) 
     end 
end) 

Link to comment
marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
vehicles = (217, 499) 
  
addEventHandler("onClientMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and player == localPlayer then 
          local vh = getPedOccupiedVehicle(player) 
          if vh then 
               setElementModel(vh, math.random(#vehicles)) 
          end 
     end 
end) 

Wrong.

local marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona", 2, 0, 255, 0 ); 
  
addEventHandler( "onClientMarkerHit", marker, 
    function( ele ) 
        if ( getElementType( ele ) == 'player' and ele == localPlayer then 
            local vehicle = getPedOccupiedVehicle( ele ); 
            if ( vehicle ) then 
                setElementModel( vehicle, math.random( 217, 499 ) ); 
            end 
        end 
    end 
) 

Link to comment
marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
vehicles = (217, 499) 
  
addEventHandler("onClientMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and player == localPlayer then 
          local vh = getPedOccupiedVehicle(player) 
          if vh then 
               setElementModel(vh, math.random(#vehicles)) 
          end 
     end 
end) 

Wrong.

local marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona", 2, 0, 255, 0 ); 
  
addEventHandler( "onClientMarkerHit", marker, 
    function( ele ) 
        if ( getElementType( ele ) == 'player' and ele == localPlayer then 
            local vehicle = getPedOccupiedVehicle( ele ); 
            if ( vehicle ) then 
                setElementModel( vehicle, math.random( 217, 499 ) ); 
            end 
        end 
    end 
) 

Wrong.

local marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona", 2, 0, 255, 0 ); 
  
addEventHandler( "onClientMarkerHit", marker, 
    function( ele ) 
        if ( getElementType( ele ) == 'player' and ele == localPlayer ) then 
            local vehicle = getPedOccupiedVehicle( ele ); 
            if ( vehicle ) then 
                setElementModel( vehicle, math.random( 400, 611 ) ); 
            end 
        end 
    end 
) 

Link to comment
marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona",2,0,255,0) 
vehicles = (217, 499) 
  
addEventHandler("onClientMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and player == localPlayer then 
          local vh = getPedOccupiedVehicle(player) 
          if vh then 
               setElementModel(vh, math.random(#vehicles)) 
          end 
     end 
end) 

Wrong.

local marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona", 2, 0, 255, 0 ); 
  
addEventHandler( "onClientMarkerHit", marker, 
    function( ele ) 
        if ( getElementType( ele ) == 'player' and ele == localPlayer then 
            local vehicle = getPedOccupiedVehicle( ele ); 
            if ( vehicle ) then 
                setElementModel( vehicle, math.random( 217, 499 ) ); 
            end 
        end 
    end 
) 

Wrong.

local marker = createMarker( 1355.4749755859, 251.35711669922, 19.5546875, "corona", 2, 0, 255, 0 ); 
  
addEventHandler( "onClientMarkerHit", marker, 
    function( ele ) 
        if ( getElementType( ele ) == 'player' and ele == localPlayer ) then 
            local vehicle = getPedOccupiedVehicle( ele ); 
            if ( vehicle ) then 
                setElementModel( vehicle, math.random( 400, 611 ) ); 
            end 
        end 
    end 
) 

I just fixed the code you posted, I didn't change anything that the OP wanted to change later. Forgot to put '(', though.

Link to comment
no i not like this kind scripts this is when you write /wanted then you get wanted i need a script if a player kill or try to kill him get wanted automatically

This is just an example of usage for these function, you can do whatever you want with them.

if you want it for when kill player or when player get damage you have to use these event onPlayerWasted and onPlayerDamage.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...