Jump to content

Marker problem


Wei

Recommended Posts

I don't know how to explain it, but it'll always be like that, due to your character's given position with the freeroam CMD ( and any other unless you minus it ).

Anyhow, just cut a '1' off from the 'z' argument. 14 > 13

  
createMarker ( 1177.53137, -1319.97766, 13.07530, "cylinder", 1, 255, 255, 0, 170 ) 
  

Link to comment

whats the problem here ...

CODE:

function spawnmepolice ( thePlayer ) 
        setPlayerTeam ( thePlayer, police ) 
        setPlayerNametagColor ( thePlayer, 0, 0, 205 ) 
        setElementModel ( thePlayer, 281 ) 
        giveWeapon ( thePlayer, 3, 10000 ) 
        outputChatBox ( "*INFO: You are now employed as Police Officer", thePlayer, 255, 255, 0 ) 
end 
  
addEventHandler("onPlayerMarkerHit", policemarker, spawnmepolice ) 

It doesn't spawn me in Police.

No errors anywhere

Link to comment
Guest Guest4401
Because there is no 'onPlayerMarkerHit'. It's 'onMarkerHit'.

https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit

local policemarker = createMarker ( 1177.53137, -1319.97766, 13.07530, "cylinder", 1, 255, 255, 0, 170 ) 
  
function spawnmepolice(markerHit) 
    if markerHit == policemarker then 
        setPlayerTeam(source, police) 
        setPlayerNametagColor(source, 0,0,205) 
        setElementModel(source, 281) 
        giveWeapon(source, 3, 10000) 
        outputChatBox("*INFO: You are now employed as Police Officer", source, 255,255,0) 
    end 
end 
addEventHandler("onPlayerMarkerHit", root, spawnmepolice) 

?

Link to comment

last problem today.

It doesn't work.

Shows empty

exports [ 'scoreboard' ]:addScoreboardColumn ( 'Group' ) 
  
addEventHandler ( "onPlayerChat", root, 
    function ( _, thePlayer ) 
        local theSkin = getElementModel ( thePlayer ) 
        if ( theSkin == 217 ) then 
            sGroup = "Admin" 
        elseif ( theSkin == 1 ) then 
            sGroup = "Guest" 
        end 
        setElementData ( thePlayer, 'Group', sGroup ) 
    end 
) 

Link to comment
local sGroup; 
call ( getResourceFromName ( 'scoreboard' ), 'addScoreboardColumn', 'Group' ); 
  
addEventHandler ( 'onPlayerChat', root, 
    function ( ) 
        if ( getElementModel ( source ) == 217 ) then 
            sGroup = 'Admin'; 
        elseif ( getElementModel ( source ) == 1 ) then 
            sGroup = 'Guest'; 
        end 
        setElementData ( source, 'Group', sGroup ); 
    end 
) 

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...