Jump to content

Help Cylinder Skin


MontiVante

Recommended Posts

hello friends I need a help in a script that there is an error that does not let me work what I want to do with that script is to be able to make a cylinder so that when a player goes to the military base in find the cylinder and put the point fixed and give him the skin that is assigned by the clan and I need help in order to serve :/

local Marker1 = createMarker ( 1246.4675292969, 338.46069335938, 18.5546875, "cylinder", 3, 0, 0, 255, 100)

function Skinc (sourcee1) 
        local playerr = getPlayerFromName(sourcee1) 
                if getPlayerTeam(playerr) = getTeamFromName("Militar")) then 
    outputChatBox (getPlayerName(playerr) .. ' is not Militar Member!', source, 255, 0, 0 ) 
       return 
    end 
    setElementModel ( playerr, 17 ) 
    outputChatBox (getPlayerName(playerr) .. ' #00FF00Has been giving a Militar Skin', source, 255, 0, 0) 
end 
addEvent( "Skinc", true) 
addEventHandler( "Skinc", getRootElement (), Marker1, Skinc )

 

Link to comment
4 minutes ago, santinet12 said:

hello friends I need a help in a script that there is an error that does not let me work what I want to do with that script is to be able to make a cylinder so that when a player goes to the military base in find the cylinder and put the point fixed and give him the skin that is assigned by the clan and I need help in order to serve :/

 

if getPlayerTeam(playerr) == getTeamFromName("Militar")) then 

 

addEventHandler( "Skinc", getRootElement (), Skinc )

 

Edited by 3laa33
Link to comment

function Skinc (sourcee1) 

         playerr = getPlayerFromName(sourcee1) 
	
	if getPlayerTeam( playerr ) and getTeamName( getPlayerTeam( playerr ) ) == 'Militar' then 
       
      setElementModel (playerr, 17 ) 

    outputChatBox (""..getPlayerName(playerr) .. ' #00FF00Has been giving a Militar Skin', source, 255, 0, 0,true)
    
		 else

    outputChatBox (""..getPlayerName(playerr) .. ' is not Militar Member!', source, 255, 0, 0,true) 

	end 
	
  end 

end 
addEvent( "Skinc", true) 

addEventHandler( "Skinc",root, Skinc )

 

Edited by Ahmed Ly
Link to comment
local Marker1 = createMarker ( 1246.4675292969, 338.46069335938, 18.5546875, "cylinder", 3, 0, 0, 255, 100)

function Skinc (playerr) 
        if isElement(playerr) and getElementType(playerr) == "player" then
                if getPlayerTeam(playerr) ~= getTeamFromName("Militar")) then 
    outputChatBox (getPlayerName(playerr) .. ' is not Militar Member!', source, 255, 0, 0 ) 
       return 
    end 
    setElementModel ( playerr, 17 ) 
    outputChatBox (getPlayerName(playerr) .. ' #00FF00Has been giving a Militar Skin', source, 255, 0, 0) 
end 
addEventHandler( "onMarkerHit", Marker1, Skinc )

 

Edited by 3laa33
Link to comment
local Marker1 = createMarker ( 1246.4675292969, 338.46069335938, 18.5546875, "cylinder", 3, 0, 0, 255, 100)

function Skinc (hitElement) 
	if(getElementType(hitElement) == "player") then
		if getPlayerTeam(hitElement) ~= getTeamFromName("Militar") then 
			outputChatBox (getPlayerName(hitElement) .. ' is not Militar Member!', hitElement, 255, 0, 0, true )
		else
			setElementModel ( hitElement, 17 ) 
			outputChatBox (getPlayerName(hitElement) .. ' #00FF00Has been giving a Militar Skin', hitElement, 255, 0, 0, true) 
		end	 
	end
end 
addEventHandler( "onMarkerHit", Marker1, Skinc )

 

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