Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. Wei

    DX Panel Skills

    Animation is very nice Good job
  2. Wei

    while

    Thank you both for explanation
  3. Wei

    while

    how to use while in scripts ?
  4. you can not get players, you can only get accounts getAccounts()
  5. onElementClicked then check if source is that element
  6. Wei

    player

    setElementCollidableWith
  7. Wei

    Bot Problem

    botTable = {} addEvent("Accept",true) addEventHandler("Accept",root, function (hitElement) botTable["Girl"] = call ( getResourceFromName ( "slothbot" ), "spawnBot", x,y,z,0,115,Dim,Int,nil,0) call ( getResourceFromName ( "slothbot" ), "setBotFollow",botTable["Girl"], hitElement ) setTimer( function () call(getResourceFromName("slothbot"), "setBotAttackEnabled",botTable["Girl"],false ) end,60000,0) end ) addEvent("onBotWasted",true) addEventHandler ( "onBotWasted", root, function ( attacker ) if (source == botTable["Girl"]) then outputChatBox("Mission Failed",attacker,255,0,0) destroyElement(finishMarker) destroyElement(myBlip) end end) do you have x,y,z,Dim,Int defined ?
  8. dxDrawText("#ff0000Hunter #00ff00Reached",0,sy/3,sx,sy,tocolor(255,255,255,alfa*255),(2.5*sx/1920)*alfa*1.6,"default-bold","center","center",true, false, false, true)
  9. This messages are embedded into mta. No problem...
  10. use cancelEvent() -- With event "onClientChatMessage"
  11. function kickall(thePlayer, cmd, ...) text = table.concat({...}, " ") for _, player in ipairs (getElementsByType("player")) do kickPlayer(player,thePlayer , text) end end addCommandHandler("kickall", kickall)
  12. Wei

    custom radar blips

    Did some calculating and stuff and found the answer Thanks anyway
  13. Wei

    custom radar blips

    Can you explain me or give me sample ?
  14. I tried to use this code to make the blips on my custom radar. viewtopic.php?f=91&t=71784 But when I rotate mouse everything rotates and blips are not in the position they are supposed to be... local blipX = (17+(300/2))+cblipx-(blipsize/2) local blipY = (608+(154/2))+cblipy-(blipsize/2) blipX = math.max(17, math.min(17 + 300, blipX)) blipY = math.max(608, math.min(608 + 154, blipY)) this are calculations image :
  15. function finishLoad(player, cash) local cash = tostring(cash) givePlayerMoney(player, tonumber(cash)) setLoadCount(player) end addEvent("finishRoute", true) addEventHandler("finishRoute", root, finishLoad) function setLoadCount(plr) local playerAcc = getPlayerAccount(plr) local loads = getAccountData(playerAcc, "hdt.loads") if (loads) then setAccountData(playerAcc, "hdt.loads", loads+1) setElementData(plr, "Completed Loads", loads+1) else setAccountData(playerAcc, "hdt.loads", 1) setElementData(plr, "Completed Loads", 1) end end Try
  16. Wei

    SOLVED!

    yeah... copy it again
  17. Wei

    SOLVED!

    function cars () c1 = createVehicle ( 602, 2284.399, -1114.599, 37.700, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function lock (vehicle) if (vehicle == c1) then if (not getElementModel (source) == 29) then cancelEvent() outputChatBox ("This vehicle is locked on team: Avenged Sevenfold!", source) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), lock)
  18. Wei

    Question

    Ah nevermind about this problem. I have another question... I just want to run function from table... I think I need to use loadstring or _G.. Like stringFunction = "getPlayerMoney(player)" function run(player) money = -- idk what is here end
  19. Wei

    Question

    I just wan't to run functions trought table, and what function returns it should save as data.index
  20. Wei

    Question

    local theTable = { [1]=getElementData(player, "Bungee"), [2]=getPlayerMoney(player), [3]=getElementDimension(player), -- ... } for k=1, #theTable do setAccountData(account, "data."..k, theTable[k]) end I wan't to save this as what function returns..
  21. Wei

    MTA Server

    You can download mta-paradise here: https://github.com/mabako/mta-paradise you need to install mysql server and then you should follow this instructions, if you will have any problems you should post here in forum... # MTA: Paradise Installation ## MySQL configuration ### Creating the database. Create a new database, the server should automatically create all required tables if it can login and the needed privilegies are granted. ### Configuring the server To make your server use your MySQL database, edit your *settings.xml* to at least contain the following settings - of course, replace the example values with the MySQL data to connect to the server. <settings> <!-- MySQL Configuration --> <setting name="@sql.user" value="username"/> <setting name="@sql.password" value="password"/> <setting name="@sql.database" value="database"/> <setting name="@sql.hostname" value="localhost"/> <setting name="@sql.port" value="3306"/> <!-- Only use this on Linux if the normal connection does fail even though using the correct username & password. --> <setting name="@sql.socket" value="/var/run/mysqld/mysqld.sock"/> <!-- Registration --> <setting name="@players.allow_registration" value="1"/><!-- Change to 0 to disable registration and show an error message --> <setting name="@players.registration_error_message" value="Edit this to show the user a message when registration is disabled"/> </settings> ## MTA Server configuration ### Obtaining the resources To get started, clone either the [main repository]([url=git://github.com/marcusbauer/mta-paradise.git]git://github.com/marcusbauer/mta-paradise.git[/url]) or your fork into *mods/deathmatch*. It should already come with all configuration files required. ### Linux If you are using a linux server, edit your *mods/deathmatch/mtaserver.conf* and replace <module src="mta_mysql.dll"/> with <module src="mta_mysql.so"/> ### Windows You need to copy the file *mods/deathmatch/modules/libmysql.dll* to your *MTA Server* directory (the one with MTA Server.exe in it) ### Ready to go! Assuming your MySQL connection details are correctly set up, all left to do is to start the MTA server. Otherwise, the server will keep shutting down on startup, look at *mods/deathmatch/logs/server.log* for a detailed error message.
  22. Wei

    MTA Server

    I don't realy know. this is depending on scripts. If they use MySQL database or they use basic database. You should pay this guy if you think it is worth it but I dubt it... I think you should try installing mta-paradise, but it is a bit outdated. But it should work for you at begining
  23. Wei

    MTA Server

    Depending what scripts does include... I can't realy say. I think that scripts are stolen since you can't get a gamemode for 12€.
  24. Wei

    MTA Server

    The host will not set the scripts for you, this is not their job... What roleplay scripts do you want to install ? Basic roleplay by Socialz or MTA-Paradise by Mabako
×
×
  • Create New...