angelberge Posted January 17, 2013 Posted January 17, 2013 Hola me gustaria saber las funciones para abrir un Gui cuando me pare en un marker. y para agregar un comando para crear un marker.
FraN-724 Posted January 17, 2013 Posted January 17, 2013 (edited) addCommandHandler Para crear el marker Y no estoy muy seguro si es esta function para cuando te pares en un marker te aparesca la gui guiSetVisible Edited January 17, 2013 by Guest
angelberge Posted January 17, 2013 Author Posted January 17, 2013 addCommandHandler ( "campeonato", Marcador ) Esto me esta generando error me muestra Bad argument en addCommandHandler
angelberge Posted January 17, 2013 Author Posted January 17, 2013 Server side: -- Define the function that will handle the 'createmarker' command function consoleCreateMarker ( playerSource, commandName ) -- If a player triggered it (rather than the admin) then if ( playerSource ) -- Get that player's position x, y, z = getElementPosition ( playerSource ) -- Create a marker at their position createMarker ( x, y, z, 0, "checkpoint", 255, 0, 0, 255 ) -- Output it in the chat box outputChatBox ( "You got a red marker", playerSource ) end end -- Add the function as a handler for the command addCommandHandler ( "vallejo", consoleCreateMarker ) Pero solo error en el server side. Bad argument Soy un poco nuevo en esto.
FraN-724 Posted January 17, 2013 Posted January 17, 2013 Prueba Así function consoleCreateMarker ( playerSource, commandName ) if ( playerSource ) then local x, y, z = getElementPosition ( playerSource ) local marker = createMarker ( x, y, z, 0, "checkpoint", 255, 0, 0, 255 ) outputChatBox ( "You got a red marker", playerSource ) end end addCommandHandler ( "vallejo", consoleCreateMarker )
Recommended Posts