Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. I don't understand your question.
  2. You should only connect when the resource starts, not every time you want to retrieve data. Try this: addEventHandler ( "onResourceStart", resourceRoot, function ( ) connect = dbConnect ( "mysql", "dbname=localhost;host=localhost", "admin", "admin", "share=1" ) end ) function loadPlayerData ( thePlayer, datatype ) if ( connect ) and ( thePlayer) and ( datatype ) then local guest = getElementData ( thePlayer, "loggedin" ) if ( not guest == false ) then local account = getElementData ( thePlayer, "account" ) local findQuery = dbQuery ( connect, "SELECT `".. datatype .."` FROM smf_sdmembers WHERE passwd = '".. account .."'" ) if ( findQuery ) then outputChatBox ( "".. tostring ( findQuery ).."" ) local result, numrows, errmsg = dbPoll ( findQuery, - 1 ) if ( numrows > 0 ) then outputChatBox ( "".. result [ 1 ] [ datatype ].."") return result [ 1 ] [ datatype ] else return 0 end else outputDebugString ( "Failed to get ".. datatype .." for player ".. getPlayerName ( thePlayer ) .." @ findQuery" ) end else outputDebugString ( "Player not logged ".. getPlayerName ( thePlayer ) .."." ) end else outputDebugString ( "Bad arguments loadPlayerData." ) end end
  3. You could try searching for another program to import it back.
  4. La verdad que ni idea, nunca use ese game mode para mi, ademas esta compilado.
  5. Si, pero para eso necesitas tener experiencia en Scripting del MTA. Necesitas crear un radar area con: createRadarArea y darle el element data "zombieProof" con setElementData.
  6. Movido a la seccion "Scripting".
  7. Castillo

    Help

    function pQuit ( ) if ( isElement ( carros [ source ] ) ) then destroyElement ( carros [ source ] ) end end addEventHandler ( "onPlayerQuit", root, pQuit )
  8. You must create the colshape on a part of the Area 69 and start setting the radius from there.
  9. This: addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLCreateTable ( "HouseData", "Name STRING, Preis INT, Int INT, PosX FLOAT, PosY FLOAT, PosZ FLOAT, IntX, IntY, IntZ" ) for index, row in ipairs ( executeSQLQuery ( "SELECT * FROM HouseData" ) ) do createPickup ( tonumber ( row [ "PosX" ] ), tonumber ( row [ "PosY" ] ), tonumber ( row [ "PosZ" ] ), 3, 1272, 2000 ) end end )
  10. Castillo

    Help

    That just makes totally no sense, no offense. addEventHandler ( "onClientMarkerHit", carrosMarker, function ( hitPlayer ) if ( hitPlayer == localPlayer and not isPedInVehicle ( localPlayer ) ) then guiSetVisible ( carrosWindow, true ) showCursor ( true ) end end )
  11. Como que un map random? no te entiendo. Ni aclaras que game mode estas usando.
  12. Castillo

    Show bank money

    addCommandHandler ( "money", -- Attach the command handler to our function. function ( thePlayer ) local account = getPlayerAccount ( thePlayer ) -- Get the player account. if ( not isGuestAccount ( account ) ) then -- If the account isn't guest. local balance = tonumber ( getAccountData ( account, "bank.balance" ) ) or 0 -- Get the account bank balance. outputChatBox ( "Your bank balance is $".. balance, thePlayer, 0, 255, 0 ) -- Output the balance to the player. end -- End the guest account check. end -- End the function. ) Read the comments.
  13. Castillo

    Words

    These screenshots are from your server? because default race game mode doesn't has that.
  14. Castillo

    Words

    That must be on "race_client.lua".
  15. playerBlipWindow = guiCreateWindow(384,150,199,294,"Player blip panel",false) guiWindowSetSizable(playerBlipWindow,false) gridListOfPlayers = guiCreateGridList(9,23,181,201,false,playerBlipWindow) guiGridListAddColumn(gridListOfPlayers,"Players",0.2) blipUnblipBut = guiCreateButton(9,232,85,52,"Blip/ \n Unblip",false,playerBlipWindow) closeBut = guiCreateButton(97,233,85,52,"Close",false,playerBlipWindow) function loadPlayers ( ) guiGridListClear ( gridListOfPlayers ) -- Clear current items. for index, player in ipairs ( getElementsByType ( "player" ) ) do -- Loop the current players. guiGridListSetItemText ( gridListOfPlayers, guiGridListAddRow ( gridListOfPlayers ), 1, tostring ( getPlayerName ( player ) ), false, false ) -- Add a row and set the text to the player name. end end addEventHandler ( "onClientResourceStart", resourceRoot, loadPlayers ) addEventHandler ( "onClientPlayerJoin", root, loadPlayers ) addEventHandler ( "onClientPlayerQuit", root, loadPlayers ) addEventHandler ( "onClientPlayerChangeNick", root, loadPlayers ) As for blips you must use: createBlipAttachedTo destroyElement
  16. Use a for loop with the query received.
  17. You must make a table with the radar/colshapes, because you have a loop there, is replacing "ra" variable with new radar area created.
  18. Yes, my local server is running a 1.3 nightly build.
  19. That doesn't work here either, why don't you use the server side one instead?
  20. The script works fine here, I can't exit the vehicle if it's locked.
  21. Castillo

    ratio

    Sorry, my bad, I didn't see the end
  22. Para que queres usar el shader? Con las funciones de DirectX drawing podes hacer que yo sepa. dxDrawLine
  23. Castillo

    ratio

    You forgot to end the second function Yakuza.
×
×
  • Create New...