Jump to content

[AYUDA]evento


Felipe Viedma

Recommended Posts

bueno eh estado trabjando en un script de eventwarp al estilo CIT y ya casi esta listo solo me falta hacer la funcion para que los

player al teclear /eventwarp se warpeen al marker que se creo en mi posicion aqui el script

server_side :

function consoleCreateMarker ( thePlayer, commandName )    if hasObjectPermissionTo ( thePlayer, "command.mute" ) then       local x, y, z = getElementPosition ( thePlayer )       if ( theMarker ) then       if isElement(theMarker) then destroyElement(theMarker) theMarker = nil end      if isElement(blip) then destroyElement(blip) blip = nil end         outputChatBox ( "event disabled", thePlayer )     else      theMarker = createMarker ( x + 2, y + 2, z - 1, "cylinder", 1.5, 255, 255, 0, 170 )         blip = createBlipAttachedTo ( theMarker, 49, 1 )        dim = getElementDimension ( thePlayer )         int = getElementInterior(thePlayer)         setElementDimension ( theMarker, dim )      setElementInterior ( theMarker, int)        outputChatBox ( "#00FF00An event has just been created use #FF0000/eventwarp #00FF00now!", getRootElement(), 255, 255, 255, true )      end    end end addCommandHandler ( "evento", consoleCreateMarker ) 

la ayuda es si me pudieran complementar con alguna funcion o bien comentarme algunas de las cosas que puedo hacer :)

gracias de ante mano :D

Link to comment

Yo lo veo por completo ordenado:

function consoleCreateMarker ( thePlayer, commandName ) 
    if hasObjectPermissionTo ( thePlayer, "command.mute" ) then 
       local x, y, z = getElementPosition ( thePlayer ) 
       if ( theMarker ) then 
       if isElement(theMarker) then 
 destroyElement(theMarker)  
theMarker = nil  
end  
     if isElement(blip) then destroyElement(blip) 
 blip = nil 
 end 
         outputChatBox ( "event disabled", thePlayer ) 
     else 
      theMarker = createMarker ( x + 2, y + 2, z - 1, "cylinder", 1.5, 255, 255, 0, 170 ) 
         blip = createBlipAttachedTo ( theMarker, 49, 1 ) 
        dim = getElementDimension ( thePlayer ) 
         int = getElementInterior(thePlayer) 
         setElementDimension ( theMarker, dim ) 
      setElementInterior ( theMarker, int) 
        outputChatBox ( "#00FF00An event has just been created use #FF0000/eventwarp #00FF00now!", getRootElement(), 255, 255, 255, true )   
    end 
    end  
end  
addCommandHandler ( "evento", consoleCreateMarker ) 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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