Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Qestion

    Have you tried going to the profile? I believe there is a close account option.
  2. Castillo

    a question

    getDistanceBetweenPoints3D getDistanceBetweenPoints2D
  3. Just change the X and Y position ( first two arguments at dxDrawRectangle ).
  4. You could try using CEGUI properties, I'm not sure if there is one for that though. https://wiki.multitheftauto.com/wiki/GuiSetProperty
  5. Wiki quote: You must get the player online from the account. Example: local player = getAccountPlayer ( account ) if ( player ) then -- Set element data end
  6. No, MTA has no default function to do this, and is not required either.
  7. Looks nice! P.S: Ain't the model floating? not really standing on the floor?
  8. If the host has FTP, you can upload it to the resources folder.
  9. Castillo

    [Q&A]

    Well, you could use a JSON with SQLite to store each map name in the JSON and then increase it when the player wins a map. executeSQLQuery or dbConnect dbQuery dbExec and toJSON fromJSON
  10. Castillo

    ACL

    You can use element data, set it when the player logs in if he's in the ACL group.
  11. About the MySQL database viewer, I guess you can just use phpMyAdmin and create users with no edit permissions.
  12. Did you do what Saml1er said?
  13. Define a variable with the last tick count value and one with the current color, then compare them inside the function where you draw the text, if X milliseconds has passed, update the color and last updated variables.
  14. Castillo

    [Q&A]

    You mean how many times each player has won each map?
  15. Do: if ( data == "true" ) then
  16. local pBlips = { } addEventHandler("onResourceStart", resourceRoot, function() for index, player in ipairs(getElementsByType("player")) do addTeamBlip(player) end end ) function addTeamBlip(player) if ( pBlips[player] ) then return false end -- Adding a prevention of duplicate blips local theGang = getElementData ( player, "gang" ) if ( theGang and theGang ~= "None" ) then local r, g, b = getPlayerNametagColor( player ) local theBlip = createBlipAttachedTo( player, 0, 2, r, g, b ) -- Change visibility to only the team members setElementVisibleTo( theBlip, root, false ) for index, value in ipairs ( getPlayersByGang ( theGang ) ) do -- THIS setElementVisibleTo( theBlip, value, true ) end pBlips[player] = theBlip end end function destroyBlip(element) local theElement = source or element if ( theElement ) then destroyElement(pBlips[theElement]) pBlips[theElement] = nil -- Just in-case... end end -- Events addEventHandler ( "onPlayerSpawn", root, addTeamBlip ) -- onPlayerSpawn will now add a teamBlip addEventHandler ( "onPlayerQuit", root, destroyBlip ) addEventHandler ( "onPlayerWasted", root, destroyBlip ) function getPlayersByGang ( gang ) local players = { } for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "gang" ) == gang ) then table.insert ( players, player ) end end return players end
  17. No, no, you did it wrong, I told you to use getPlayersByGang function instead of the other one, you put the entire function code in the for-loop.
  18. Eso es porque no lo creaste como pickup de arma, usaste el tipo '3' que es 'Custom Pickup' no 'Weapon Pickup'. Cambia el '3' por un '2'.
  19. function getPlayersByGang ( gang ) local players = { } for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "gang" ) == gang ) then table.insert ( players, player ) end end return players end Use that function instead of: exports["gang_system"]:getGangMembers(theGang)
  20. No sera que estas agarrando el pickup al crearlo? ya que es en la posicion que esta el jugador.
  21. Was bored, so I filled it up aswell
  22. http://www.lua.org/cgi-bin/demo
×
×
  • Create New...