csiguusz
Members-
Posts
500 -
Joined
-
Last visited
Everything posted by csiguusz
-
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)
-
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.
-
Why are you using a table? Isn't math.random ( 10 ) easier? And the brackets are missing from your function.
-
You are welcome.
-
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...
-
Guieditor is only for making a nice gui. There aren't functions "for it". These are functions wich you can use in any scripts.
-
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 )
-
Try using the following functions: setVehicleDoorOpenRatio setVehicleOverrideLights / setVehicleLightState setVehicleLocked
-
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
-
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" )
-
Search the wiki for functions that you may need. For displaying a text in the text box use outputChatBox.
-
@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.
-
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.
-
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)
-
And don't you want to make it open source?
-
dxDrawText( "No. of players online: " .. tostring( #getElementsByType( "player" ) ), 10, 300 ); A ")" was missing to close tostring.
-
Then restart your server or use the reloadBans function through the runcode resource in the webadmin or the server console.
-
You are welcome... again
-
Allow "command.stopall" in the Admin ACL.
-
You are welcome.
-
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.
-
Maybe they have on the another server a newer version of the admin panel, wich has those new buttons.
-
Á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.
-
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".
-
An element can't be a vehicle and a player at the same time. if getElementType ( clickedElement ) == "vehicle" and getElementType ( clickedElement ) == "player" then
