Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. I mean how you insert the objects into the table.
  2. The table send should be ok, although you don't tell us how your table works.
  3. I guess shaders could do this, although I don't have HLSL knowledge.
  4. You're talking about the sky color? you can change it with setSkyGradient.
  5. Ya te dije como, usa las funciones que te di.
  6. Eso no tiene sentido, empeza a pensar como podria funcionar.
  7. I meant when you want to change the "bank" value, you change the element data instead of the MySQL row.
  8. You have to save the position element data as a string. mysql = exports.mysql infopoint = createPickup(-206.5537109375, 1132.1015625, 19.7421875, 3, 1239) -- ServerSide! function info (thePlayer) outputChatBox("Welcome To Fort Carson Roleplay Server",thePlayer) cancelEvent() end addEventHandler ( "onPickupHit", infopoint, info ) function createinfo(thePlayer, commandName, ...) if info then if (exports.global:isPlayerAdmin(thePlayer)) then local x,y,z = getElementPosition(thePlayer) local message = table.concat({...}, " ") infopointpickup = createPickup(x, y, z, 3, 1239, 0.1) setElementData( infopointpickup,"Message", message ) setElementData( infopointpickup,"Pos", x ..", ".. y ..",".. z ) addEventHandler("onPickupHit", infopointpickup, infohit) end else outputChatBox("SYNTAX: /" .. commandName .. " [info]", thePlayer) end end addCommandHandler("createinfo", createinfo) function infohit(thePlayer) message = getElementData( infopointpickup,"Message") outputChatBox("" .. message .."",thePlayer) end function saveinfo() message = getElementData( infopointpickup,"Message") pos = getElementData( infopointpickup,"Pos") mysql:query_free('INSERT INTO infopoints (pos, message) VALUES ("' .. mysql:escape_string(pos) .. '", ' .. mysql:escape_string(message) .. ')') end
  9. Yeah, and now when you enter the marker, it'll get that element data. Now instead of updating the table when you want to change the "bank", you update the element data of the player and when logout/quit, you get that element data and then update the MySQL.
  10. Castillo

    badArgument

    You're not disturbing me, I'm here to help. You're welcome.
  11. Usa triggerServerEvent. Pero primero debes obtener el vehiculo seleccionado: -- client side: guiGridListGetSelectedItem guiGridListGetItemText getVehicleModelFromName triggerServerEvent -- server side: addEvent addEventHandler createVehicle
  12. Castillo

    badArgument

    I've tested your script and it has no problems, it's working fine. Are you sure that the XML is successfully loaded? Try this: function refresh ( ) local theVehXML = xmlLoadFile ( "vehicle.xml" ) if ( theVehXML ) then local node = xmlFindChild ( theVehXML, getPlayerName(getLocalPlayer()).."VehicleID", 0 ) local success = xmlNodeGetValue ( node ) local node1 = xmlFindChild ( theVehXML, getPlayerName(getLocalPlayer()).."VehicleName", 0 ) local success1 = xmlNodeGetValue ( node1 ) local node2 = xmlFindChild ( theVehXML, getPlayerName(getLocalPlayer()).."VehicleLocation", 0 ) local success2 = xmlNodeGetValue (node2 ) local node3 = xmlFindChild ( theVehXML, getPlayerName(getLocalPlayer()).."VehicleHealth", 0 ) local success3 = xmlNodeGetValue ( node3 ) guiSetText(theVehID, tostring( success ) ) guiSetText(theVehName, tostring( success1 ) ) guiSetText(theVehLocation, tostring( success2 ) ) guiSetText(theVehHealth, tostring( success3 ) ) else outputChatBox ( "Failed to load vehicle.xml!", 255, 0, 0 ) end end
  13. You can do the following: On login: Set the element data of his "banca" and when you update it. On logout/quit: Get that element data and update the MySQL table.
  14. Castillo

    badArgument

    Can you show us your XML file as well?
  15. Usa esta funcion: https://wiki.multitheftauto.com/wiki/FindRotation
  16. I really don't recommend using a 1 second timer to loop all players and do a MySQL query.
  17. "player" es nil ahi. addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "L", "down", crear ) end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) ramps = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "L", "down", crear ) end end ) function crear ( player, key, keyState ) local mx, my, mz = getElementPosition ( player ) local accame = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user.".. accame, aclGetGroup ( "Admin" ) ) then ramps [ player ] = createObject ( 1634, mx + 5, my, mz ) setTimer ( function ( theRamp ) if ( theRamp ) then destroyElement ( theRamp ) end end ,3000, 1, ramps [ player ] ) end end
  18. Decis todos los vehiculos del GTA? si es asi, entonces usa esta tabla ( no es mia, esta en la wiki ): vehicleIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 } Luego usas un loop de "ipairs" y con las funciones de GUI grid list: guiGridListAddRow guiGridListSetItemText
  19. Castillo

    Error

    If the script is client side, it won't output that error anymore.
  20. function removeWorldModel() -- [b]Here, call it something else[/b]. removeWorldModel(1260,200,615,-1509,30) -- Billboard removeWorldModel(0,200,615,-1509,30) -- Billboard end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), removeWorldModel) Read my comment.
  21. The AMX converter won't work with 0.3 SA-MP scripts. I suggest you to start learning Lua scripting.
  22. Castillo

    Anim GUI

    Set the animation library before the script into the meta.xml.
  23. Castillo

    Error

    Is set as server side, I told you that it must be client side.
×
×
  • Create New...