Jump to content

DakiLLa

Members
  • Posts

    965
  • Joined

  • Last visited

Everything posted by DakiLLa

  1. DakiLLa

    skin

    Well, text: The text you want to put in (does NOT accept numbers, use tostring() for that) So guiGridListSetItemText(GUIEditor_Grid[1], row, skinclm, tostring(skin), false, false)
  2. Если юзаешь Notepad++, ты должен преобразовать исходный текст скрипта в UTF-8 без BOM (Меню-Кодировки->Преобразовать в UTF-8 без BOM).
  3. I hope that dev's are already working on this problem to make MTA prevent those kind of modified gtasa.exe's. Neither there was such topic somewhere on this forum while ago.
  4. Open 'race_client.lua' and find the 21st line, there should be something like g_dxGUI = { - table, containing that text positions, colors etc. If you want to change a color, you should add g_dxGUI.ranknum:color( 255, 0, 0, 255 ) --will make your rank text red and so on for any other text element.
  5. Show me your meta.xml file. Did you define that script as client-side? ="my_script.lua" type="client" /> Edit: oh, and look at the 8th line, it must be: local sound = playSound("sounds/angry.mp3")
  6. function AngryEmotion(command) outputChatBox( "* "..getPlayerName(getLocalPlayer()).." is angry", 255, 0, 255, true ) angry() end addCommandHandler("angry", AngryEmotion) function angry() local sound = playSound("sounds/angry.mp3") --typo end Since it is a client-side, no one will see your message. If you want to output your message to everyone, you should add a server side event and trigger it when you type /angry. So the final result will be: --client function AngryEmotion(command) triggerServerEvent( "onAngry", getLocalPlayer() ) angry() end addCommandHandler("angry", AngryEmotion) function angry() local sound = playSound("sounds/angry.mp3") end --server addEvent( "onAngry", true ) addEventHandler( "onAngry", root, function() outputChatBox( "* "..getPlayerName(source).." is angry", root, 255, 0, 255, true ) end )
  7. You mean this? local someFunc = {} someFunc["someString"] = function ( a, b, c ) end --etc.
  8. Hmm, you can tell us what you actually wanted, and may be, if you have some lua skills we could help you to implement it?
  9. DakiLLa

    Check

    You could just do if not getAccountData( getPlayerAccount( player ), "dataNameYouWantToCheck" ) then outputChatBox( "Joined for the first time" ) setAccountData( getPlayerAccount( player ), "dataNameYouWantToCheck", "yes" ) else outputChatBox( "Welcome back on my server" ) end since getAccountData returns false if no data was found with such key. edit: and notice that thing that Solidsnake14 said.
  10. DakiLLa

    Error launching 1.1

    Yes, I have a MTA 1.0.4 and it also works fine. But the 1.1 won't launch in any way... EDIT: Oh, nvm, I have set up a compatability with Windows XP SP 3 (but I have a Windows 7) and it works fine now.
  11. DakiLLa

    Error launching 1.1

    Hi, I have a problem when trying to launch MTA 1.1. Everytime I try to launch it shows up an error: -broken image link removed at the request of OP- I have installed the latest build (2363) and also the data files. I thought that the problem is due to installed MTA 1.0.4, I uninstalled it and then installed 1.1 again, but that didn't help. I also tryed to install 1.1 in other directory and even the old builds but that didn't help too. No one have been experiencing such problem? Btw, when un-installing the 1.1 it also shows some crappy errors.
  12. Hmm, neon highlighting? Sounds like a good idea
  13. Ok, lets go by steps: 1) look the first line: the variable 'localplayer' should be 'localPlayer' (case sensitive, you know). 2) I just got a code for you (not tested though) with comments: local localPlayer = getLocalPlayer() --lets put all your markers co-ordinates in a table to handle them later local mp = { { 1058.8583984375,1375.248046875,10.446697235107 }, { 1005.3486328125,1334.0693359375,10.419406890869 }, { 1029.42578125,1190.646484375,10.588260650635 } } function createFirstMarker() setElementData( localPlayer, "test", 1 ); createNextMarker( 1 ) --to create the first marker end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), createFirstMarker ) function onTestMarkerHit( hitElement, dim ) if getElementType( hitElement ) == "player" then --if a player just got in the marker removeEventHandler( "onClientMarkerHit", source, onTestMarkerHit ) --source is the marker that player got in destroyElement( source ); --we dont need this marker anymore setElementData( hitElement, "test", getElementData( hitElement, "test" ) + 1 ) --increase player 'marker count' by one if mp[ getElementData( hitElement, "test" ) ] then --if there is an existing row with this index in 'mp' table, create the next marker createNextMarker( getElementData( hitElement, "test" ) ) else outputChatBox( "There are no any markers left" ); end end end function createNextMarker( id ) local x, y, z = mp[ id ][ 1 ], mp[ id ][ 2 ], mp[ id ][ 3 ] --get the co-ordinates from the 'mp' table local newMarker = createMarker( x, y, z, "checkpoint" ) addEventHandler( "onClientMarkerHit", newMarker, onTestMarkerHit ) end
  14. Eh, can you please explain better and more clearly what you actually want?
  15. The second parameter of this function is invalid in your case. As the wiki says, it should be an element (but getElementsByType returns a table). So I think that this function crashes the client if invalid parameters were passed in it. for i, v in ipairs( getElementsByType( 'vehicle' ) ) do setElementCollidableWith( getPedOccupiedVehicle(localPlayer), v, false ) end Should work fine.
  16. DakiLLa

    Borrow:P

    You should parse admin rights for this resource. How can you do this? Open ACL.xml file located in your 'server/mods/deathmatch' directory, find the next line: name="Admin"> and put the next thing below: name="resource.p-login" /> So the final result will look like: name="Admin"> name="Moderator" /> name="SuperModerator" /> name="Admin" /> name="RPC" /> name="resource.admin" /> name="resource.webadmin" /> name="resource.p-login" /> > Enjoy!
  17. Show us a full code please, probably the 'source' is the issue.
  18. I guess it should be string.find(name, destiny) since you are searching any matches with 'destiny' in player's name.
  19. DakiLLa

    Help MTA

    IsObjectInACLGroup should help you. You can play with the first example..
  20. You can see the current MTA 1.1 progress here. Btw, welcome
  21. May be you could try something by yourself and show us what you got? Things that you will need are: onPlayerWasted event givePlayerMoney function
×
×
  • Create New...