• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Egekan

  • Rank
  • Birthday 30/09/1999


  • Gang
  • Location
  • Occupation

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Egekan

    Interesting question.

    function isElementUnderRoof(el) local x, y, z = getElementPosition(el) if getGroundPosition(x,y, z) == getGroundPosition(x,y,z+ 800) then return false else return true end end Use this.
  2. function changemypw(plr,cmd,oldpw,newpw) local accname = getAccountName(getPlayerAccount(plr)) if getAccount(accname,oldpw) then if setAccountPassword(getPlayerAccount(plr),newpw) then outputChatBox("Password for acc:"..accname.." successfully changed as: "..newpw,plr,20,230,20) else outputChatBox("The script needs admin access.",plr,230,20,20) end else outputChatBox("Invalid password!",plr,230,20,20) end end addCommandHandler("changepw",changemypw) There you go, use "/changepw <oldpassword> <newpassword>" The script must be in admin ACL in order to work.
  3. Egekan

    [QUESTION] "onClientVehicleEnter" Event

    outputChatBox is not the main problem for me. I get more than one outputs even if I get the output with another resource which has onClientVehicleEnter handler. This affects everything for example if I draw DX thing with onClientVehicleEnter handler, everything will be doubled. I will make a new one, seems like there is no solution. Thanks to the people who tried to help me. Topic can be locked
  4. Egekan

    [QUESTION] "onClientVehicleEnter" Event

    Yes I'm the only player on the server, as I said second spawner script works fine. There must be something wrong with the first one.
  5. Hello, I've made a carspawner script. function spawnveh(plr,veh,x,y,z,rx,ry,rz) for k,v in ipairs(getElementsByType("vehicle")) do if v and getElementData(v,"owner") == getPlayerName(plr) then destroyElement(v) end end local xx,yy,zz = getElementPosition(plr) local veh = createVehicle(getVehicleModelFromName(veh),xx,yy,zz,rx,ry,rz,"Egekan") setElementData(veh,"owner",getPlayerName(plr)) setVehicleColor(veh,255,100,15,255,100,15) warpPedIntoVehicle(plr,veh) setElementFrozen(plr,false) end addEvent("Spawn",true) addEventHandler("Spawn",getRootElement(),spawnveh) Everything works fine, I'can spawn the vehicle by clicking the spawn button from client side but: It seems like this custom event triggers "onClientVehicleEnter" event for 4 or more times. When I put outputChatBox function which is handled by "onClientVehicleEnter", I always get 4 outputs once. I have also a vehiclehud script, so the hud displays for 4 times when you spawn a vehicle. But everyting is fine if I spawn the vehicle with adminpanel, or just enter a vehicle with "F" key. This is another carspawner script made by me, when I spawn the vehicle using the button in this one everything is fine just like adminpanel. function spawnveh(plr,vehid) local x,y,z = getElementPosition(plr) local rx,ry,rz = getElementRotation(plr) local allvehicles = getElementsByType("Vehicle") for k,v in ipairs(allvehicles) do if getElementData(v,"Owner") == getAccountName(getPlayerAccount(plr)) then destroyElement(v) end end if getPedOccupiedVehicle(plr) then destroyElement(getPedOccupiedVehicle(plr)) end if getVehicleNameFromModel(vehid) then vehicle = createVehicle(vehid,x,y,z,rx,ry,rz,"Ege FTW") setElementData(vehicle,"Owner",getAccountName(getPlayerAccount(plr))) warpPedIntoVehicle(plr,vehicle) end if getVehicleModelFromName(vehid) then vehicle = createVehicle(getVehicleModelFromName(vehid),x,y,z,rx,ry,rz,"Ege FTW") setElementData(vehicle,"Owner",getAccountName(getPlayerAccount(plr))) warpPedIntoVehicle(plr,vehicle) end end addEvent("spawnVehServer",true) addEventHandler("spawnVehServer",getRootElement(),spawnveh) They both are nearly same.
  6. Egekan

    22005 TCP Port

    Hello; I have a local server to test my scripts before uploading them. There are some scripts which must be tested with at least 2 or more players. So I need to do some port forwarding settings. I used the same settings before (4-5 months ago) and everything was cool, and people were able to connect, join and download the resources. But now, I'm using the same settings as before and I'm having a problem with the TCP one. My port settings: Translations: Protokol(ler): Protocol(s) Sil: Delete Başla: Start Son: End Yeni: New Uygula: Apply Sıfırla: Reset And the result: People can not download the resources. Because of the 2005 one.
  7. Egekan

    unable to use engineImportTXD

    I've a server to test customskins I've made. The script works fine with skinid:217. Whenever I try to use the same code on id:141 or id:283, it doesn't work at all. engineApplyShaderToWorldTexture is not working aswell, I've made some sultan paintjobs by using the function before. So I know how to use it. Script: function staffskin(plr) txtstaff = engineLoadTXD("csher.txd") engineImportTXD(txtstaff,283) txtstaff = engineLoadTXD("skin2.txd") engineImportTXD(txtstaff,141) end addCommandHandler("marineskin",staffskin) Meta: <meta> <script src="joinquit.lua" type="client" /> <file src="csher.txd" /> <file src="skin2.txd" /> </meta>
  8. Egekan

    connection timed out!!!

    Hello, if you have firewall, you must allow MTA to have acces to the internet. If you don't know how to do that: Choose Start -> Control Panel -> System and Security -> Allow a Program through Windows Firewall. Pick MTA from there, if you can't see it in the list, click ''Allow another app'' and find it there. After you've done with that you need to disable your antivirus software. Try again you probably will be able to play.
  9. Egekan

    Can't open ports! Please help!

    Exactly. After you set your static ip don't forget to change the defined IP Adress( to the new ip adress(the IP adress chosen by you) which is in Port Forwarding page.
  10. Egekan

    Can't open ports! Please help!

    I'm having the same problem atm, - Disable your Windows and tp-link(which is probably in the security section) firewalls. - Set a static ip for you computer. Because everytime you connect, it gives you a random ip number. If you don't know how to set a static ip:
  11. Egekan

    What does local port mean?

    Thank you but still.. The console says that my ports haven't opened yet.
  12. Egekan

    What does local port mean?

    Hello, I have a home-made server. I'm a newbie scripter and sometimes I need to test my scripts with my friend(s). I'm using: As you see my ports are ready(I guess) But still, the console(openports) says that every port is closed. I think the problem is "Local Port". I couldn't find any information about it on the net. I have no idea about what does it mean. Can someone tell me what am I supposed to do to solve this problem. By the way if it's wrong place to ask this, I'm sorry. I couldn't find a better place to ask. Thank you.
  13. Egekan

    Using tables with if statement

    Thank you very much!
  14. Egekan

    Using tables with if statement

    Hello, I'm a newbie scripter and I'm trying to script somethings for fun. I have a private scripting server. I have an accesspanel gui, there are some dev. access codes(passwords) to login as a scripter. Is is possible to use allow some poeple login with their own codes? First one checks if the code which is in the editbox is exists or not. As you see if it does, the person will be able to click the button. function devenable() local acscodes = {"1234", "1231"} if guiGetText(accesscode.edit) == acscodes then -- Checks if the code is valid or not. guiSetEnabled(connect.button, true) else guiSetEnabled(connect.button, false) end end setTimer(devenable, 1000,0) function devaccess() if guiGetEnabled(connect.button,true) then guiSetVisible(ServAccess.window, false) showCursor(false) end if guiGetText(accesscode.edit) == acscodes[1] then outputChatBox("Hello, Egekan. Developer Mode is enabled!", 0, 200, 0) elseif guiGetText(accesscode.edit) == acscodes[2] then outputChatBox("Hello, AnyPerson. Developer Mode is enabled!", 0, 200, 0) end end addEventHandler("onClientGUIClick", connect.button, devaccess) it's fine if I use this one instead, which means the script is good enough local acscodes = 1234 Thank you for helping
  15. Egekan

    setAccountData işlemiyor

    function SASA() local ortakveri = getAccountData(ac,"ortakveri") local ac = getPlayerAccount(source) if (ac) and (not isGuestAccount(ac)) and (ortakveri) and (getClanData(ortakveri,"isim", false)) then setAccountData(ac,"ortakveri",false) -- only this setting data. why ? setAccountData(ac,"uye",false) -- not set setAccountData(ac,"yetkili",false) -- not set setAccountData(ac,"kurucu",false) -- not set end end addEventHandler("onPlayerLogin",root, SASA) Debug olayı bazen saçmalıyor bende de, hiç emin değilim ama bi dene şunu belki işini görür getClanData kısmında hata yapmış olabilirim düzelt debug hatalı derse.