Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Sasu

    Ped problem

    Because its frozen I supossed.
  2. Sasu

    Closing the gates

    He said: Oh sorry. I didnt see that. Thanks for say me . And... Player argument Its not necesarry
  3. Sasu

    Closing the gates

    object1 = createObject(986, 2497.3999023438, 2777.3000488281, 11.5, 0, 0, 270.24169921875) -- right gate object2 = createObject(985, 2497.3000488281, 2769.3000488281, 11.5, 0, 0, 270.24169921875) -- left gate function gateo() -- moving the gates function moveObject(object1, 3000, 2497.099609375, 2785.099609375, 11.5, 0, 0, 0) -- opening the gates moveObject(object2, 3000, 2497.3999023438, 2761, 11.5, 0, 0, 0) -- opening the gates end function gatec() -- closing the gates function moveObject(object1, 3000, 2497.3999023438, 2777.3000488281, 11.5, 0, 0, 0 ) -- closing the gates moveObject(object2, 3000, 2497.3000488281, 2769.3000488281, 11.5, 0, 0, 0) -- closing the gates end addCommandHandler("nopedotavi", gateo) addCommandHandler("nopedotavi2", gatec) You forgot create another commando to close. I create a command /nopedotavi2 to close.
  4. Post the script that you have again.
  5. Sasu

    XML and Memo

    GUIEditor.memo[2] = guiCreateMemo(169, 27, 395, 194, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(10, 27, 156, 219, false, GUIEditor.window[1]) topics = guiGridListAddColumn(GUIEditor.gridlist[1], "Topics", 0.9) rulesRow = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], rulesRow, topics, "Rules", false, false ) if (guiGridListGetSelectedItem (GUIEditor.gridlist[1]) == rulesRow) then local xmlRules = xmlLoadFile ( "rules.xml" ) local RulesValue = xmlNodeGetValue ( xmlRules) guiSetText (GUIEditor.memo[2], tostring ( RulesValue ) ) meta <meta> <script src="c.lua" type="client"/> <file src="rules.xml" </meta>
  6. setAccountData y getAccountData es parecido al setElementData y getElementData. Solo que setAccountData guarda datos, lo que vos quieras, en la cuenta del player y getAccountData es para obtenerlas. Si tu quieres mostrarle algo cuando se registre, puedes hacer esto: Que verifique si tiene un dato especefico, si no lo tiene le mostras lo que queres. Asi mira: function onPlayerNuevoQuit() local playeraccount = getPlayerAccount(source)--Obtener cuenta del player if ( playeraccount ) and not isGuestAccount ( playeraccount ) then if (not getAccountData(playeraccount, "nuevo")) then -- Si no obtiene el dato... setAccountData(playeraccount, "nuevo", "viejo") -- Darle el dato diciendo que este player ya es viejo asi no le aparece la bienvenida end end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerNuevoQuit) function onPlayerRegister(_, playeraccount) if (not getAccountData(playeraccount, "nuevo")) then--Si no tiene el dato... outputChatBox("Bienvenido a nuestro server 24/7 de MTA:SA", source, 0, 255, 0, false)--mostrarle en el chat lo que esta entre "" end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerRegister) No se si me explique bien.
  7. But You should say me that This script is yours -.-'. viewtopic.php?f=145&t=54693 So delete pls the resource. https://community.multitheftauto.com/ind ... ls&id=6635 and delete this too https://community.multitheftauto.com/ind ... ls&id=6638 Thx DONE
  8. Its yours. Oh sorry. I post as my own because you helped me to create this script but I didnt think that its yours. Sorry. I will request deleted that.
  9. You didnt create a function with this thePed = createPed ( 1, 0, 0, 500, 90 ) setElementFrozen ( thePed, true ) setCameraMatrix ( -3.6658203125, 0, 500.48254455566, 2906.9938964844, 0, 201.84664916992 ) Animations = { "dnce_M_b"} setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) theObject = createObject ( 1337, 0, 0, 499, 60 ) setElementAlpha ( theObject, 0 ) SpawnBtn = guiCreateButton( 0, 0, 125, 62.5, "Spawn", false ) centerWindow ( SpawnBtn, 1.2, 1.96 ) RightBtn = guiCreateButton( 0, 0, 70, 35, ">", false ) centerWindow ( RightBtn, 2, 1.4 ) LeftBtn = guiCreateButton( 0, 0, 70, 35, "<", false ) centerWindow ( LeftBtn, 2, 3.3 ) showCursor ( true ) This should be: function joinPlayer() thePed = createPed ( 1, 0, 0, 500, 90 ) setElementFrozen ( thePed, true ) setCameraMatrix ( -3.6658203125, 0, 500.48254455566, 2906.9938964844, 0, 201.84664916992 ) Animations = { "dnce_M_b"} setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) theObject = createObject ( 1337, 0, 0, 499, 60 ) setElementAlpha ( theObject, 0 ) SpawnBtn = guiCreateButton( 0, 0, 125, 62.5, "Spawn", false ) centerWindow ( SpawnBtn, 1.2, 1.96 ) RightBtn = guiCreateButton( 0, 0, 70, 35, ">", false ) centerWindow ( RightBtn, 2, 1.4 ) LeftBtn = guiCreateButton( 0, 0, 70, 35, "<", false ) centerWindow ( LeftBtn, 2, 3.3 ) showCursor ( true ) end addEventHandler("onClientPlayerJoin", getRootElement(), joinPlayer)
  10. Yes, of course. exports.scoreboard:addScoreboardColumn('SALA') function thesala() local playerTeam = getPlayerTeam ( source ) local account = getPlayerAccount(source) local accName1 = getAccountName(account) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Owner" ) ) then setAccountData ( account, "SALA", "Owner" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) then setAccountData ( account, "SALA", "Admin" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "SuperModerator" ) ) then setAccountData ( account, "SALA", "SuperModerator" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Moderator" ) ) then setAccountData ( account, "SALA", "Moderator" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "TrialModerator" ) ) then setAccountData ( account, "SALA", "TrialModerator" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Everyone" ) ) then setAccountData ( account, "SALA", "Player" ) elseif ( playerTeam == "SWAT" ) then setAccountData ( account, "SALA", "Player" ) elseif ( playerTeam == "Military" ) then setAccountData ( account, "SALA", "Player" ) elseif ( playerTeam == "Army" ) then setAccountData ( account, "SALA", "Player" ) end end addEventHandler("onPlayerLogin", getRootElement(), thesala) addEventHandler("onPlayerLogin",root, function () local Guest = getPlayerAccount(source) if isGuestAccount(Guest) then return end local sala = getAccountData(Guest,"SALA") if sala then setElementData(source,"SALA", sala) end end ) Now its works with players too.
  11. Sasu

    Bus job

    Me puedes explicar como hacerlo?
  12. Sasu

    Bus job

    Como puedo hacer para que cuando entre a un vehiculo(ponele cualquiera), se cree el primer marker y al entrar al marker se cree otro. Tengo esta tabla de coordenadas: local busTable = { [1]={1818.0244140625, -1913.658203125, 10.820078849792},[2]={1181.87, -1796.36, 13.3984},[3]={1164.47, -1712.17, 13.7231},[4]={1038.74, -1712.84, 13.4254},[5]={1037.64, -1558.29, 13.3862}, [6]={1061.46, -1443.02, 13.4006},[7]={1051.46, -1396.45, 13.4565},[8]={825.122, -1395.14, 13.3444},[9]={648.371, -1395.33, 13.3444},[10]={635.96, -1252.67, 17.1576}, [11]={554.18, -1122.47, 27.2105},[12]={238.52, -1170.34, 19.5841},[13]={-43.18, -1354.07, 11.2299},[14]={-284.8, -1642.00, 15.5116},[15]={-354.4, -1831.65, 22.2320}, [16]={-348.6, -2125.50, 28.3879},[17]={-174.6, -2413.64, 35.6235},[18]={-36.62, -2711.40, 42.0042} }
  13. accName1 is not defined. exports.scoreboard:addScoreboardColumn('SALA') function thesala() local playerTeam = getPlayerTeam ( source ) local account = getPlayerAccount(source) local accName1 = getAccountName(account) local zombiekills = getAccountData(account, "Zombie kills") if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Owner" ) ) then setAccountData ( account, "SALA", "Owner" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) then setAccountData ( account, "SALA", "Admin" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "SuperModerator" ) ) then setAccountData ( account, "SALA", "SuperModerator" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Moderator" ) ) then setAccountData ( account, "SALA", "Moderator" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "TrialModerator" ) ) then setAccountData ( account, "SALA", "TrialModerator" ) elseif ( playerTeam == "SWAT" ) then setAccountData ( account, "SALA", "Player" ) elseif ( playerTeam == "Military" ) then setAccountData ( account, "SALA", "Player" ) elseif ( playerTeam == "Army" ) then setAccountData ( account, "SALA", "Player" ) end end addEventHandler("onPlayerLogin", getRootElement(), thesala) addEventHandler("onPlayerLogin",root, function () local Guest = getPlayerAccount(source) if isGuestAccount(Guest) then return end local sala = getAccountData(Guest,"SALA") if sala then setElementData(source,"SALA", sala) end end ) Try this.
  14. Try this: local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end local gang = exports [ "gang_system" ]:getPlayerGang ( hitElement ) if ( gang == "FBI" ) then setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end )
  15. Create another ._. https://community.multitheftauto.com/index.php?p= ... ls&id=6607 DONE
  16. https://community.multitheftauto.com/index.php?p= ... ls&id=6612 https://community.multitheftauto.com/index.php?p= ... ls&id=4030 Description says delete. DONE
  17. Do you want that the command create a vehicle to a target?
  18. Intenta cambiando esta linea triggerClientEvent ( root, "admin", root, getPlayerName ( source ) ) Por triggerClientEvent ( source, "admin", source, getPlayerName ( source ) ) Otra cosa. Vos queres que este mensaje se lo muestre a todos los que loguean? Porque este script esta configurado para solo los admins ue loguean.
  19. Ademas zorro el dijo cuando el player loguee.
  20. Client: -------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Client-Side -------------------------------------------------------------------------------------------- local adminName = "" addEvent ( "admin", true ) addEventHandler ( "admin", getRootElement(), function ( name ) adminName = name addEventHandler ( "onClientRender", getRootElement(), logueoadmin ) setTimer ( function ( ) removeEventHandler ( "onClientRender", getRootElement(), logueoadmin ) end ,7000, 1 ) end ) function logueoadmin ( ) dxDrawRectangle(417, 648, 500, 30, tocolor(0, 0, 0, 0), true) dxDrawText( adminName .." (Admin |Lv4|) Ha iniciado Sesion!", 422, 649, 845, 668, tocolor(255, 255, 255, 255), 1, "pricedown", "left", "top", false, false, true, false, false) end Server: -------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Server-Side -------------------------------------------------------------------------------------------- addEventHandler ( "onPlayerLogin", getRootElement(), function ( _, account ) if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( root, "admin", root, getPlayerName ( source ) ) end end ) EDIT: Perdon ne confundi. Prueba asi.
  21. Mira, yo pregunte y me ayudaron. Funciona correctamente y sin errores. viewtopic.php?f=91&t=54632&hilit=dxDrawText+onPlayerLogin
  22. Haz el dx en donde quieras, publicalo, y yo te ayudo.
×
×
  • Create New...