Jump to content

Necesito ayuda como seria esto?


Matt

Recommended Posts

Me gustaria hacer cmd para un base de un clan llamado LGM solo los de ese team o gang puedan utilizarlo ejemplo /lgmentry este cmd solo sea utilizable para los que pertenecen al team o gang y que ponga un mensaje asi *[server]No Perteneces A Este Clan por favor como seria.

------------------------------------------------Script-----------------------------------------------------

function createTheGate ()

myGate1 = createObject ( 10828, 836.5, -2069.6999511719, 23, 0, 359.99993896484, 0 )

end

addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate )

function openMyGate ( )

moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 8 )

end

addCommandHandler("lgmentry",openMyGate)

function movingMyGateBack ()

moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 23 )

end

addCommandHandler("lgmentry",movingMyGateBack)

Link to comment

Usas el gang system de castillo. Si es asi prueba:

------------------------------------------------Script----------------------------------------------------- 
  
function createTheGate () 
myGate1 = createObject ( 10828, 836.5, -2069.6999511719, 23, 0, 359.99993896484, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) 
  
function openMyGate (source) 
if ( getElementData(source, "gang", true) == "LGM") then 
moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 8 ) 
else 
outputChatBox("#FF0000[server]#00FF00No Perteneces A Este Clan.", source, 255, 255, 255, true) 
end 
end 
addCommandHandler("lgmentry",openMyGate) 
  
function movingMyGateBack () 
if ( getElementData(source, "gang", true) == "LGM") then 
moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 23 ) 
else 
outputChatBox("#FF0000[server]#00FF00No Perteneces A Este Clan.", source, 255, 255, 255, true) 
end 
end 
addCommandHandler("lgmentry2",movingMyGateBack) 

Link to comment

Y si lo quieres por team :

------------------------------------------------Script----------------------------------------------------- 
  
function createTheGate () 
myGate1 = createObject ( 10828, 836.5, -2069.6999511719, 23, 0, 359.99993896484, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) 
  
function openMyGate (source) 
    if ( getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) ~= "LGM" ) then 
moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 8 ) 
    else 
outputChatBox("#FF0000[server]#00FF00No Perteneces A Este Clan.", source, 255, 255, 255, true) 
    end 
end 
addCommandHandler("lgmentry",openMyGate) 
  
function movingMyGateBack () 
    if ( getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) ~= "LGM" ) then 
moveObject ( myGate1, 2500, 836.5, -2069.6999511719, 23 ) 
    else 
outputChatBox("#FF0000[server]#00FF00No Perteneces A Este Clan.", source, 255, 255, 255, true) 
    end 
end 
addCommandHandler("lgmentry2",movingMyGateBack) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...