Jump to content

csiguusz

Members
  • Posts

    500
  • Joined

  • Last visited

Everything posted by csiguusz

  1. Try this: function adminchat(thePlayer, command, ...) local account = getPlayerAccount ( thePlayer ) local access = false for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator" } ) do if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup (group) ) then access = true end end if not access then exports["Evo-notificaciones"]:showBox ( thePlayer, "error", " "..getPlayerName(thePlayer).."Acceso Denegado.") return end local word = {...} local message = table.concat(word, " ") for i, v in ipairs ( getElementsByType ( "player" ) ) do account = getPlayerAccount ( v ) access = false for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator" } ) do if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup (group) ) then access = true end end if access then outputChatBox ( "#FF0000[Admin Chat]" .. getPlayerName ( thePlayer ) .. ": " .. message, v, 255, 255, 255, true ) end end end addCommandHandler("adminchat", adminchat)
  2. You don't have to be so experienced to know how to define a function. PS: Örülök neki! De magyarul inkább csak a magyar fórumon.
  3. Why are you using a table? Isn't math.random ( 10 ) easier? And the brackets are missing from your function.
  4. You can't. You can make the gui with the editor, then you have to know a bit about scripting to give some functions to the buttons for example...
  5. Guieditor is only for making a nice gui. There aren't functions "for it". These are functions wich you can use in any scripts.
  6. The first argument returned by the onPlayerVehicleEnter event is the vehicle. Source is the player. And it wont give money if there isn't a function wich gives money. function givestuff ( theVehicle ) if theVehicle == misteryvan then givePlayerMoney ( source, 100 ) destroyElement ( misteryvan ) end end addEventHandler ( "onPlayerVehicleEnter", root, givestuff )
  7. Try using the following functions: setVehicleDoorOpenRatio setVehicleOverrideLights / setVehicleLightState setVehicleLocked
  8. This is an example, how you can get one set of random coordinates from a table: local locations = { { 1, 4, 10 }, { 33, 45, 10 }, { 21, 4, 10 }, { 4, 11, 30 } } function spawnVan () local x, y, z = unpack ( locations [ math.random ( 1, #locations ) ] ) misteryvan = createVehicle (482, x, y, z ) end
  9. Set the "forceHideTeams" in the soreboard's settings to true ( so the teams wont be displayed ), then add a new column with exports.scoreboard:scoreboardAddColumn ( "Team" ) Then you have to set every player's "Team" element data to its team. For example: setElementData ( somePlayer, "Team", "Civilian" )
  10. Search the wiki for functions that you may need. For displaying a text in the text box use outputChatBox.
  11. @Tete omar: Yes, with the timer it should work ( It worked for me with onClientRender ) because it sets the correct position but then for some reason it jumps back.
  12. Today I tried to use the guiGridListSetVerticalScrollPosition function, but it doesn't seem to be working. The scroll position can be set between 0 and 100, but the function is bugged or what... so it sets the position wrong.
  13. function allowORnot (player, key) if isObjectInACLGroup("user."..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Pirate" ) ) then if (key == nil) then key = 0 removeEventHandler("onVehicleStartEnter", getRootElement(), pirateBoat) end elseif (key == 0) then addEventHandler ( "onVehicleStartEnter", getRootElement(), pirateBoat) key = nil end end addCommandHandler ("cannon", allowORnot)
  14. dxDrawText( "No. of players online: " .. tostring( #getElementsByType( "player" ) ), 10, 300 ); A ")" was missing to close tostring.
  15. csiguusz

    Unban my ip

    Then restart your server or use the reloadBans function through the runcode resource in the webadmin or the server console.
  16. You are welcome... again
  17. Allow "command.stopall" in the Admin ACL.
  18. Download the latest resources from there : https://code.google.com/p/mtasa-resources/downloads/list, and overwrite your current admin resource with the newer one, wich can be found in the downloaded zip file.
  19. Maybe they have on the another server a newer version of the admin panel, wich has those new buttons.
  20. Áh, szóval ezért gondolod. Pedig azt írták csak nyitni kell egy topicot és támógatókat keresni ha saját fórumot akarunk, nem semmit applyzni.
  21. Miért pont te vagy az alapító? Amúgy ha már nevek kellenek odairhatsz engem is. Na meg azért a címbe is belekötnék. Az hogy "Játékosok Az MTA:SA!" nem értelmes. Esetleg "Játékosok Az MTA:SA-n", vagy "A magyar MTA:SA játékosok".
  22. An element can't be a vehicle and a player at the same time. if getElementType ( clickedElement ) == "vehicle" and getElementType ( clickedElement ) == "player" then
×
×
  • Create New...