-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
Ok solid thnx you now When a new player connect, how I can refresh the gridlist ?
-
mm... u want Attach the ped on a object ? EDIT : if u want use it u need use it function attachElements( thePed, theObject )
-
if u want create a ped and spawn u need it ped = createPed( Skin, PosX, PosY, PosZ ) and if u have other script, post
-
OR The topic creator could just use Yakuza.real's code, as Binslayer1 said. What... ? I dont undestand
-
Just to mention how 'marker' variable is not defined properly and R,G,B and A does not contain integer values, 11th. argument does not exist. Sory my error :B marker = createMarker ( 2447.8999023438, -1664.5,13.5, "cylinder", 1, R, G, B, A, getRootElement(), true ) R = 255 G = 0 B = 0 A = 255 ---With it variables u make the marker Red window = guiCreateWindow(...) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible( window, true ) showCursor (true) end end addEventHandler ("onClientMarkerHit", marker, markerHit)
-
cl-side GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.2275,0.2367,0.5362,0.5533,"GUI Stats",true) GUIEditor_Grid[1] = guiCreateGridList(261,36,158,280,false,GUIEditor_Window[1]) column = guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.80) GUIEditor_Label[1] = guiCreateLabel(10,58,233,23,"Nickname : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(10,91,233,23,"Location : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Label[3] = guiCreateLabel(10,125,233,23,"Money : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"clear-normal") GUIEditor_Label[4] = guiCreateLabel(10,157,233,23,"Skin : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Label[5] = guiCreateLabel(10,190,233,23,"Ping : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[5],"clear-normal") GUIEditor_Label[6] = guiCreateLabel(10,223,233,23,"Dimension : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[6],"clear-normal") GUIEditor_Label[7] = guiCreateLabel(10,255,233,23,"IP : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[7],"clear-normal") guiSetVisible( GUIEditor_Window[1], false ) showCursor ( false ) function showGUI ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey ( "F2","down", showGUI ) function losLabels ( ) if ( column ) then for id, playeritem in ipairs ( getElementsByType "player" ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", resourceRoot, losLabels ) function setStats ( ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) local location = getZoneName ( x, y, z ) local money = getPlayerMoney( thePlayer ) local id = getElementModel( thePlayer ) local ping = getPlayerPing( thePlayer ) local dm = getElementDimension( thePlayer ) triggerServerEvent( "getIP", getLocalPlayer(), thePlayer ) guiSetText ( GUIEditor_Label[1], "Nickname : ".. playername ) guiSetText ( GUIEditor_Label[2], "Location : ".. location ) guiSetText ( GUIEditor_Label[3], "Money : ".. money ) guiSetText ( GUIEditor_Label[4], "Skin : ".. id ) guiSetText ( GUIEditor_Label[6], "Dimension : ".. dm ) guiSetText ( GUIEditor_Label[7], "IP : ".. ip ) if ( ping > 300 ) then guiSetText ( GUIEditor_Label[5], "Ping ( very Bad ) : ".. ping ) elseif ( ping < 300 ) and ( ping > 150 ) then guiSetText ( GUIEditor_Label[5], "Ping ( Good ) : ".. ping ) elseif ( ping < 150 ) and ( ping > 100 ) then guiSetText ( GUIEditor_Label[5], "Ping ( VeryGood ) : ".. ping ) elseif ( ping < 100 ) and ( ping > 150 ) then guiSetText ( GUIEditor_Label[5], "Ping ( Nice! ) : ".. ping ) elseif ( ping > 50 ) and ( ping < 100 ) then guiSetText ( GUIEditor_Label[5], "Ping ( ChileanPlayer! ) : ".. ping ) elseif ( ping > 0 ) and ( ping < 50 ) then guiSetText ( GUIEditor_Label[5], "Ping ( ElMota! ) : ".. ping ) end end end end end addEventHandler ( "onClientGUIDoubleClick", root, setStats ) sv-side function getIP( thePlayer ) local ip = getPlayerIP( thePlayer ) end addEvent("getIP", true) addEventHandler("getIP", getRootElement(), getIP)
-
I test ur GUI in my server and it is better infoWindow = guiCreateWindow(350,250,450,320,"Painel Info",false) button = guiCreateButton(15,40,105,35,"Regras",false,infoWindow) memo1 = guiCreateMemo(135,40,300,260,"text",false,infoWindow) guiMemoSetReadOnly( memo1, true ) guiWindowSetSizable(infoWindow,false) guiSetVisible( infoWindow, false ) -------------------------------------------------------- button = guiCreateButton(15,80,105,35,"Infor",false,infoWindow) memo2 = guiCreateMemo(135,40,300,260,"text",false,infoWindow) guiMemoSetReadOnly( memo2, true ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F1","down", infoShow ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == button ) then guiSetVisible( memo2, true ) guiSetVisible( memo1, false ) elseif ( source == button2 ) then guiSetVisible( memo1, true ) guiSetVisible( memo2, false ) end end ) - I think u have a error in memo1 doesnt create only the memo2 EDIT SORY MY ERROR XDD now it code work 100% infoWindow = guiCreateWindow(350,250,450,320,"Painel Info",false) button = guiCreateButton(15,40,105,35,"Regras",false,infoWindow) memo1 = guiCreateMemo(135,40,300,260,"text1",false,infoWindow) guiMemoSetReadOnly( memo1, true ) guiWindowSetSizable(infoWindow,false) guiSetVisible( infoWindow, false ) -------------------------------------------------------- button2 = guiCreateButton(15,80,105,35,"Infor",false,infoWindow) memo2 = guiCreateMemo(135,40,300,260,"text2",false,infoWindow) guiMemoSetReadOnly( memo2, true ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F1","down", infoShow ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == button ) then guiSetVisible( memo2, true ) guiSetVisible( memo1, false ) elseif ( source == button2 ) then guiSetVisible( memo1, true ) guiSetVisible( memo2, false ) end end )
-
I added to ACL the Resource but again the IP cant get
-
here a image of the problem I done add argument "thePlayer"
-
I never trigger with triggerClientEvent please help me to do it and how trigger thePlayer ? I dont know how trigger arguments
-
mmm try it infoWindow = guiCreateWindow(350,250,450,320,"Painel Info",false) guiCreateButton(15,40,105,35,"Regras",false,infoWindow) memo1 = guiCreateMemo(135,40,300,260,"Test text",false,infoWindow) guiMemoSetReadOnly( memo1, true ) guiWindowSetSizable(infoWindow,false) guiSetVisible( infoWindow, false ) -------------------------------------------------------- button = guiCreateButton(15,80,105,35,"Infor",false,infoWindow) memo2 = guiCreateMemo(135,40,300,260,"Test text",false,infoWindow) guiMemoSetReadOnly( memo2, true ) function infoShow () guiSetVisible( infoWindow, not guiGetVisible( infoWindow ) ) showCursor( not isCursorShowing( ) ) end bindKey ("F1", "down", infoShow ) addEventHandler("onClientGUIClick", root, function() if source == button then guiSetText( memo2, " guiGetText( memo1 ) " end end ) if doesnt work please tell me
-
thnx solid work but now Doesnt work getPlayerIP here my code cl-side GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.2275,0.2367,0.5362,0.5533,"GUI Stats",true) GUIEditor_Grid[1] = guiCreateGridList(261,36,158,280,false,GUIEditor_Window[1]) column = guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.80) GUIEditor_Label[1] = guiCreateLabel(10,58,233,23,"Nickname : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(10,91,233,23,"Location : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Label[3] = guiCreateLabel(10,125,233,23,"Money : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"clear-normal") GUIEditor_Label[4] = guiCreateLabel(10,157,233,23,"Skin : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Label[5] = guiCreateLabel(10,190,233,23,"Ping : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[5],"clear-normal") GUIEditor_Label[6] = guiCreateLabel(10,223,233,23,"Dimension : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[6],"clear-normal") GUIEditor_Label[7] = guiCreateLabel(10,255,233,23,"IP : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[7],"clear-normal") guiSetVisible( GUIEditor_Window[1], false ) showCursor ( false ) function showGUI ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey ( "F2","down", showGUI ) function losLabels ( ) if ( column ) then for id, playeritem in ipairs ( getElementsByType "player" ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", resourceRoot, losLabels ) function setStats ( ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) local location = getZoneName ( x, y, z ) local money = getPlayerMoney( thePlayer ) local id = getElementModel( thePlayer ) local ping = getPlayerPing( thePlayer ) local dm = getElementDimension( thePlayer ) triggerServerEvent( "getIP", getLocalPlayer() ) guiSetText ( GUIEditor_Label[1], "Nickname : ".. playername ) guiSetText ( GUIEditor_Label[2], "Location : ".. location ) guiSetText ( GUIEditor_Label[3], "Money : ".. money ) guiSetText ( GUIEditor_Label[4], "Skin : ".. id ) guiSetText ( GUIEditor_Label[6], "Dimension : ".. dm ) guiSetText ( GUIEditor_Label[7], "IP : ".. ip ) if ( ping > 300 ) then guiSetText ( GUIEditor_Label[5], "Ping ( very Bad ) : ".. ping ) elseif ( ping < 300 ) and ( ping > 150 ) then guiSetText ( GUIEditor_Label[5], "Ping ( Good ) : ".. ping ) elseif ( ping < 150 ) and ( ping > 100 ) then guiSetText ( GUIEditor_Label[5], "Ping ( VeryGood ) : ".. ping ) elseif ( ping < 100 ) and ( ping > 150 ) then guiSetText ( GUIEditor_Label[5], "Ping ( Nice! ) : ".. ping ) elseif ( ping > 50 ) and ( ping < 100 ) then guiSetText ( GUIEditor_Label[5], "Ping ( ChileanPlayer! ) : ".. ping ) elseif ( ping > 0 ) and ( ping < 50 ) then guiSetText ( GUIEditor_Label[5], "Ping ( ElMota! ) : ".. ping ) end end end end end addEventHandler ( "onClientGUIDoubleClick", root, setStats ) sv-side function getIP( thePlayer ) local ip = getPlayerIP( thePlayer ) end addEvent("getIP", true) addEventHandler("getIP", getRootElement(), getIP) why doesnt work
-
thnx now work but now I cant get the Zone Map function setStats ( ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) local x,y,z = getElementPosition( playername ) local location = getZoneName ( x,y,z ) guiSetText ( GUIEditor_Label[1], "Nickname : ".. playername ) guiSetText ( GUIEditor_Label[2], "Location : ".. location ) end end end addEventHandler ( "onClientGUIDoubleClick", root, setStats )
-
try it infoWindow = guiCreateWindow(350,250,450,320,"Painel Info",false) guiCreateButton(15,40,105,35,"Regras",false,infoWindow) memo = guiCreateMemo(135,40,300,260,"Test text",false,infoWindow) guiMemoSetReadOnly( memo, true ) guiWindowSetSizable(infoWindow,false) guiSetVisible( infoWindow, false ) function infoShow () guiSetVisible( infoWindow, not guiGetVisible( infoWindow ) ) showCursor( not isCursorShowing( ) ) end bindKey ("F1", "down", infoShow )
-
? marker createMarker ( 2447.8999023438, -1664.5,13.5, "cylinder", 1, R, G, B, A, getRootElement(), true ) window = guiCreateWindow(...) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible( window, true ) showCursor (true) end end addEventHandler ("onClientMarkerHit", marker, markerHit) I think u want do it
-
Again the last Problem Here a image
-
soren = no se puede aser videos solo las funciones ya existentes creo y para hacer lo mas cercano a un vide seria un gif que seria poner muchas imagenes con un Timer pero eso seria re arto trabajo y para hacer cuando el player se conectara seria asi como lo puse ase un rato
-
doesnt work man The Text doesnt set
-
en el cl-side function EXAMPLE() dxDraw o GUICreateWindow(...) end addEvent("CrearTutorial", true ) addEventHandler("CrearTutorial", getLocalPlayer(), EXAMPLE) en el sv-side function EXAMPLES() triggerClientEvent( "CrearTutorial", getRootElement() ) end addEventHandler("onPlayerJoin", EXAMPLES) Nose si sirva ya que lo ise apurado pero puedes investigar algunas cosas de las que puse
-
I done it code but I dont know how set the texts here the code GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.2275,0.2367,0.5362,0.5533,"GUI Stats",true) GUIEditor_Grid[1] = guiCreateGridList(261,36,158,280,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.-- s8) --> GUIEditor_Label[1] = guiCreateLabel(10,58,233,23,"Nickname : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(10,91,233,23,"Location : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Label[3] = guiCreateLabel(10,125,233,23,"Money : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"clear-normal") GUIEditor_Label[4] = guiCreateLabel(10,157,233,23,"Skin : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Label[5] = guiCreateLabel(10,190,233,23,"Ping : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[5],"clear-normal") GUIEditor_Label[6] = guiCreateLabel(10,223,233,23,"Dimension : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[6],"clear-normal") GUIEditor_Label[7] = guiCreateLabel(10,255,233,23,"IP : \"\"",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[7],"clear-normal") guiSetVisible( GUIEditor_Window[1] , false ) showCursor(false) function showGUI() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2","down", showGUI) function losLabels() if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getRootElement(), losLabels) function setStats() if source == GUIEditor_Grid[1] then local playername = guiGridListSetItemText( GUIEditor_Grid[1], row, column ) guiSetText( GUIEditor_Label[1], "Nickname : "..playername" ) end end addEventHandler("onClientGUIDoubleClick", root, setStats)
-
ye seb I has undestand it , but I dont undestand "myText"
-
for a radio of GTA Default : I think it setRadioChannel( ID ) ID = Radios of GTA 0: Radio Off 1: Playback FM 2: K-Rose 3: K-DST 4: Bounce FM 5: SF-UR 6: Radio Los Santos 7: Radio X 8: CSR 103.9 9: K-Jah West 10: Master Sounds 98.3 11: WCTR 12: User Track Player for internet radio I think it playSound ( "URL of The Sound or Radio" ) example playSound ( "http://www.website.com/sound.mp3" )
-
mmm Ok man voy entendiendo , pero lo del executeSQlQuery en lo de VALUES eso no entendi
