Jump to content

Michael#

Members
  • Posts

    168
  • Joined

  • Last visited

Everything posted by Michael#

  1. Can't you just edit a reply? 3 posts Server-side: addEvent ( 'objcrt', true ); addEventHandler ( 'objcrt', root, function ( chk ) outputChatBox ( tostring ( chk ) ); -- check here what outputs toggleAllControls ( thePlayer, false ); -- where is thePlayer defined? showCursor ( thePlayer, false ); -- where is thePlayer defined? local nX, nY, nZ = getElementPosition ( thePlayer ); -- where is thePlayer defined? local nX2, nY2, nZ3 = getElementRotation ( thePlayer ); -- where is thePlayer defined? if ( chk == 0 ) then rbobj = createObject(1459, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 1 ) then rbobj = createObject(1424, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 2 ) then rbobj = createObject(1425, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 3 ) then rbobj = createObject(1423, nX, nY, nZ-0.2, nX2, nY2, nZ2); elseif chk == 4 then rbobj = createObject(981, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif chk == 5 then rbobj = createObject(978, nX, nY, nZ-0.5, nX2, nY2, nZ2); end end ) Client-side: local tRBNames = { [ 'roadright' ] = 'Small roadblock'; [ 'helix_barrier' ] = 'Big Street Roadblock'; [ 'roadworkbarrier1' ] = 'Sidewalk Roadblock'; [ 'roadbarrier4' ] = 'Barrier'; [ 'roadbarrier3' ] = 'Detour sign'; [ 'roadbarrier6' ] = 'Small barrier'; } function cGUI() showCursor(true) toggleAllControls(true) rbsWindow = guiCreateWindow(0.3391,0.2832,0.3125,0.4688,"Roadblock System",true) guiWindowSetSizable(rbsWindow,false) acceptButton = guiCreateButton(0.1075,0.8813,0.3225,0.0854,"Accept",true,rbsWindow) closeButton = guiCreateButton(0.57,0.8813,0.3225,0.0854,"Close",true,rbsWindow) rbsMenu = guiCreateGridList(0.11,0.1292,0.785,0.725,true,rbsWindow) guiGridListSetSelectionMode(rbsMenu,2) guiGridListAddColumn(rbsMenu,"Roadblocks",0.90) for _, sObject in ipairs ( tRBNames ) do if ( rbsMenu ) then local row = guiGridListAddRow ( rbsMenu ) guiGridListSetItemText ( rbsMenu, row, 1, tostring ( sObject ), false, false ) end end addEventHandler("onClientGUIClick", root, function ( ) if ( source == acceptButton ) then local chk = guiGridListGetSelectedItem ( rbsMenu ) if ( chk ) then triggerServerEvent("objcrt", root, chk) guiSetVisible(rbsWindow, false) end elseif ( source == closeButton ) then guiSetVisible(rbsWindow, false) toggleAllControls(true) showCursor(false) end end ) end addCommandHandler ( 'rb', cGUI ) Check comments. Also, where you trigger event 'objcrt' ?
  2. You mad, yes. Correct, file node don't have any type.
  3. No Brasil, a localização não conta. Apenas se o servidor estiver hospedado numa máquina local.
  4. You must create the table in phpMyAdmin and install mysql module. Then, use mysql_connect to connect to the database and mysql_query to manage. https://wiki.multitheftauto.com/wiki/Mysql
  5. One thing, for what is that? for i = 1, 6 do guiGridListAddRow(rbsMenu) end Why is that needed here if the rows are added in the first loop?
  6. Doing That Doesnt Work It Says The Table Dont Exist And I DOnt MEan Sqlite I Mean The SQL You Get With XAMPP I Mean The SQL You Get With XAMPP That's MySQL
  7. @@Kenix, that's SQLite executeSQLQuery ( "DROP TABLE testtable" ); Edit: Ok, you changed already.. Anyway, you don't need `` in SQLite.
  8. @@StanleySathler, isso não vai ajudar muito ele. A solução é arrumar uma conexão decente ( não a sua, mas os outros ), mas... isso não vai ser fácil porque tem gente que não tem muita grana... Aqui eu tenho uma conexão de 10MB, é boa pakas mas .. computador lagado pakas..
  9. uName1 = guiCreateLabel ( 50, 10, 410, 20, '', false ); uName2 = guiCreateLabel ( 50, 25, 410, 20, '', false ); uMoney1 = guiCreateLabel ( 300, 10, 410, 20, '', false ); uMoney2 = guiCreateLabel ( 300, 25, 410, 20, '', false ); addEventHandler ( 'onClientRender', root, function ( ) local pMoney = getPlayerMoney ( ); local pName = getPlayerName ( localPlayer ); guiSetText ( uMoney1, 'The Money: ' .. tonumber ( pMoney ) ); guiSetText ( uMoney2, tonumber ( pMoney ) ); guiSetText ( uName1, 'The Name: ' .. tostring ( pName ) ); guiSetText ( uName2, tostring ( pName ) ); end ) Try this. Sorry if is something wrong, I haven't tested it
  10. Ele não tem muito mais vantagem, só tem a vantagem de não ter tantos danos e de se mover facilmente sem ninguém o apanhar, mas isso, é impossivel de solucionar. Isso é um problema de conexão.
  11. guiSetVisible -- make gui element visible interpolateBetween -- use it for animations You can also use arc_ animation library or create your own, is not so hard.
  12. Isso não tem haver com script, mas sim com as suas habilidades.
  13. getPlayerMoney client-side don't has any arguments.
  14. Michael#

    old map

    For a old map, that's awesome.
  15. Michael#

    Entire value?

    Someone can have the same problem or are having the same problem but don't know how to use "math.round" functions. This must not be closed now, at least I think.
  16. Michael#

    outputChatBox

    @@naz19, please, tabulate your codes
×
×
  • Create New...