Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Nice one, keep up the good work .
  2. You're welcome. I'll lock the topic to avoid unnecessary replies.
  3. You should search on the forums, there are many topics related to this.
  4. Cierro el tema asi nadie se confunde de nuevo.
  5. Yakuza: Que yo recuerde este tema ya esta resuelto aca: viewtopic.php?f=91&t=41434
  6. function Conteo ( ) if ( isElement ( image ) ) then destroyElement ( image ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. end
  7. This should help you: https://community.multitheftauto.com/index.php?p= ... ls&id=3571
  8. Mira los argumentos de outputChatBox.
  9. Castillo

    Need help

    Use this: addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( finalskin ) if (getPlayerMoney(source) >= 350) then outputChatBox ( type ( finalskin ) ..": ".. tostring ( finalskin ) ) setElementModel ( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) takePlayerMoney ( source, 350 ) end end ) and tell me what does it output.
  10. Casi todo. function delayedChat () outputChatBox ( "1" ) setTimer ( delayedChat1, 1000, 1 ) end addCommandHandler("cuenta", delayedChat ) function delayedChat1 () outputChatBox ( "2" ) setTimer ( delayedChat2, 2000, 1 ) end function delayedChat2 () outputChatBox ( "3" ) setTimer ( delayedChat3, 3000, 1 ) end function delayedChat3 () outputChatBox ( "Go Go Go" ) end
  11. Castillo

    Need help

    addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( finalskin ) if (getPlayerMoney(source) >= 350) then setElementModel ( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) -- Your player argument is 'source', not 'localPlayer'. takePlayerMoney( source, 350 ) end end )
  12. Castillo

    Need help

    And what doesn't work? does it set your skin?
  13. Castillo

    Need help

    Should work, if you've selected a item from the gridlist.
  14. Castillo

    Need help

    As I said, copy the code again.
  15. setWeaponProperty ( 26, "pro", "maximum_clip_ammo", 1000 ) -- You put the weapon ID as a string.
  16. Castillo

    Need help

    Copy the code again.
  17. Castillo

    Need help

    Try this: local skinmsglabel = "Welcome" .. Sgrid = guiCreateGridList(12,59,345,439,false,Window) ... Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,Window) Buttonclose = guiCreateButton(240,503,117,30,"Exit",false,Window) LabelTNS = guiCreateLabel(50,36,220,30,skinmsglabel ,false,Window) ... addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1 ) triggerServerEvent ( "buySkin", localPlayer, tonumber ( finalskin ) ) else if isTimer ( timer ) then killTimer ( timer ) end guiSetText ( LabelTNS, "Error: Please select a skin from the list." ) timer = setTimer ( guiSetText, 3000, 1, LabelTNS, skinmsglabel ) end end end )
  18. Castillo

    SQL Table

    In SQL you can search for more than one argument. Example: executeSQLQuery("SELECT * FROM vehicles WHERE owner = 'Castillo' AND id = '1'")
  19. Castillo

    SQL Table

    You can assign a unique ID to each vehicle you buy.
  20. Change type="client" to type="server".
  21. It must be something else, that is just fine.
  22. Castillo

    alc Group Show

    Lil toady's admin panel has a function to get account ACL groups, you could take a look at it.
  23. Castillo

    Question

    You can get the current map with: exports.mapmanager:getRunningGamemodeMap() and change it with this: exports.mapmanager:changeGamemodeMap()
  24. Castillo

    Question

    exports[ "scoreboard" ]:scoreboardAddColumn ( "Cash" ) exports[ "scoreboard" ]:scoreboardAddColumn ( "Points" ) function setStats ( player ) if ( not player or not isElement ( player ) ) then return end local account = getPlayerAccount ( player ) if ( account and not isGuestAccount ( account ) ) then local cash = getAccountData ( account, "cash" ) local points = getAccountData ( account, "points" ) setElementData ( player, "Cash", "$" .. cash or 0 ) setElementData ( player, "Points", points or 0 ) else setElementData ( player, "Cash", "guest" ) setElementData ( player, "Points", "guest" ) end end function timer() setTimer( setStats, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) addEvent ( "onMapStarting", true ) addEventHandler ( "onMapStarting", root, function ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do setStats ( player ) end end )
×
×
  • Create New...