MontiVante Posted October 10, 2017 Posted October 10, 2017 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 )
AE. Posted October 10, 2017 Posted October 10, 2017 (edited) 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 October 10, 2017 by 3laa33
MontiVante Posted October 10, 2017 Author Posted October 10, 2017 I did what you did and it did not work
AE. Posted October 10, 2017 Posted October 10, 2017 1 minute ago, santinet12 said: I did what you did and it did not work if getPlayerTeam(playerr) ~= getTeamFromName("Militar")) then try this
MontiVante Posted October 10, 2017 Author Posted October 10, 2017 has not worked to a could not make me the function but have the cylinder "marker"
Ahmed Ly Posted October 10, 2017 Posted October 10, 2017 (edited) 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 October 10, 2017 by Ahmed Ly
AE. Posted October 10, 2017 Posted October 10, 2017 (edited) 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 October 10, 2017 by 3laa33
MaurO^ Posted October 13, 2017 Posted October 13, 2017 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 )
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