Jump to content

Taalasmaa

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by Taalasmaa

  1. Try: EDIT: Fixed some arguements. function warpStatus(player,cmd) if player then if (getElementData(player,"warp.status") == false) then setElementData(player, "warp.status", true) outputChatBox("You have enabled your warping", player) else setElementData(player, "warp.status", false) outputChatBox("You have disabled warping", player) end end end addCommandHandler("warpstatus", warpStatus) function warpMe(targetPlayer) if (getElementData(targetPlayer,"warp.status") == false) then if isPedDead(source) then spawnMe() end local vehicle = getPedOccupiedVehicle(targetPlayer) if not vehicle then -- target player is not in a vehicle - just warp next to him local x, y, z = getElementPosition(targetPlayer) clientCall(source, 'setPlayerPosition', x + 2, y, z) else -- target player is in a vehicle - warp into it if there's space left if getPedOccupiedVehicle(source) then --removePlayerFromVehicle(source) outputChatBox('Get out of your vehicle first.', source) return end local numseats = getVehicleMaxPassengers(vehicle) for i=0,numseats do if not getVehicleOccupant(vehicle, i) then if isPedDead(source) then local x, y, z = getElementPosition(vehicle) spawnMe(x + 4, y, z + 1) end warpPedIntoVehicle(source, vehicle, i) return end end outputChatBox('No free seats left in ' .. getPlayerName(targetPlayer) .. 's vehicle.', source, 255, 0, 0) end local interior = getElementInterior(targetPlayer) setElementInterior(source, interior) setCameraInterior(source, interior) end
  2. Here is 100% fixed.. Client: function trolo() x,y = guiGetScreenSize() guiDrugs = guiCreateWindow(x-285-20,y-253-20,285,253,"F3 - Drug Manager",false) lblDrug = guiCreateLabel(17,31,32,16,"Drug:",false,guiDrugs) lblAmount = guiCreateLabel(203,31,50,15,"Amount:",false,guiDrugs) rdoCannabis = guiCreateRadioButton(15,55,135,17,"Cannabis",false,guiDrugs) guiRadioButtonSetSelected(rdoCannabis,true) rdoHeroin = guiCreateRadioButton(15,79,135,17,"Heroin",false,guiDrugs) rdoCocaine = guiCreateRadioButton(15,104,135,17,"Cocaine",false,guiDrugs) rdoLSD = guiCreateRadioButton(15,129,135,17,"LSD",false,guiDrugs) rdoEcstasy = guiCreateRadioButton(15,154,135,17,"Ecstasy",false,guiDrugs) rdoOpium = guiCreateRadioButton(15,180,135,17,"Opium",false,guiDrugs) btnTakeHit = guiCreateButton(39,208,96,30,"Take a Hit",false,guiDrugs) btnSell = guiCreateButton(145,208,96,30,"Sell",false,guiDrugs) lblCannabis = guiCreateLabel(200,54,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblCannabis,"center") guiLabelSetHorizontalAlign(lblCannabis,"center",false) lblHeroin = guiCreateLabel(200,76,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblHeroin,"center") guiLabelSetHorizontalAlign(lblHeroin,"center",false) lblCocaine = guiCreateLabel(200,102,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblCocaine,"center") guiLabelSetHorizontalAlign(lblCocaine,"center",false) lblLSD = guiCreateLabel(200,127,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblLSD,"center") guiLabelSetHorizontalAlign(lblLSD,"center",false) lblEcstasy = guiCreateLabel(200,153,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblEcstasy,"center") guiLabelSetHorizontalAlign(lblEcstasy,"center",false) lblOpium = guiCreateLabel(200,179,54,14,"0",false,guiDrugs) guiLabelSetVerticalAlign(lblOpium,"center") guiLabelSetHorizontalAlign(lblOpium,"center",false) guiSetVisible(guiDrugs,false) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),trolo) function drugShowHide () if (guiGetVisible(guiDrugs)==false) then guiSetVisible(guiDrugs,true) showCursor(true) else guiSetVisible(guiDrugs,false) showCursor(false) end end bindKey("F3","down",drugShowHide) function oncQuit() amountCannabis = guiGetText(lblCannabis) amountHeroin = guiGetText(lblHeroin) amountCocaine = guiGetText(lblCocaine) amountLSD = guiGetText(lblLSD) amountEcstasy = guiGetText(lblEcstasy) amountOpium = guiGetText(lblOpium) triggerServerEvent("saveDrugAmount",getLocalPlayer(),getLocalPlayer(),amountCannabis,amountHeroin,amountCocaine,amountLSD,amountEcstasy,amountOpium) end addEventHandler("onClientPlayerQuit",getRootElement(),oncQuit) function outputDrug (var1, var2, var3, var4, var5, var6) guiSetText ( lblCannabis,var1) guiSetText ( lblHeroin,var2) guiSetText ( lblCocaine,var3) guiSetText ( lblLSD,var4) guiSetText ( lblEcstasy,var5) guiSetText ( lblOpium,var6) end addEvent( "outputDrug2", true ) addEventHandler( "outputDrug2", getRootElement(), outputDrug ) addEvent("firstTime",true) addEventHandler("firstTime",getRootElement(), function() outputChatBox ("Test Measage") guiSetText(lblCannabis,"2") guiSetText(lblHeroin,"2") guiSetText(lblCocaine,"0") guiSetText(lblLSD,"0") guiSetText(lblEcstasy,"0") guiSetText(lblOpium,"0") end) Server: addEvent("saveDrugAmount",true) addEventHandler("saveDrugAmount",getRootElement(), function(player,amountCannabisS,amountHeroinS,amountCocaineS,amountLSDS,amountEcstasyS,amountOpiumS) playeraccount = getPlayerAccount(player) if (playeraccount) then setAccountData(playeraccount,"amountCannabis",tonumber(amountCannabisS)) setAccountData(playeraccount,"amountHeroin",tonumber(amountHeroinS)) setAccountData(playeraccount,"amountCocaine",tonumber(amountCocaineS)) setAccountData(playeraccount,"amountLSDS",tonumber(amountLSDS)) setAccountData(playeraccount,"amountEcstasy",tonumber(amountEcstasyS)) setAccountData(playeraccount,"amountOpium",tonumber(amountOpiumS)) end end) function loadDrugAmount() playeraccount = getPlayerAccount(source) if (playeraccount) then amountCannabis2 = getAccountData(playeraccount,"amountCannabis") amountHeroin2 = getAccountData(playeraccount,"amountHeroin") amountCocaine2 = getAccountData(playeraccount,"amountCocaine") amountLSD2 = getAccountData(playeraccount,"amountLSDS") amountEcstasy2 = getAccountData(playeraccount,"amountEcstasy") amountOpium2 = getAccountData(playeraccount,"amountOpium") if (amountCannabis2) then triggerClientEvent (source, "outputDrug2", getRootElement(), amountCannabis2, amountHeroin2, amountCocaine2, amountLSD2, amountEcstasy2, amountOpium2 ) else triggerClientEvent(source,"firstTime",getRootElement()) end end end addEventHandler("onPlayerLogin",getRootElement(),loadDrugAmount)
  3. Glad you got it working by yourself. Just edit the server load function like this: -- load function loadTextNumb() playeraccount = getPlayerAccount(source) if (playeraccount) then number = getAccountData(playeraccount,"number") if (number) then -- DO WHATEVER YOU WANT WITH THE NUMBER ARGUEMENT else -- No number found.. New player triggerClientEvent(source,"firstTime",getRootElement()) end end end addEventHandler("onPlayerLogin",getRootElement(),loadTextNumb) and add client: addEvent("firstTime",true) addEventHandler("firstTime",getRootElement(), function() guiSetText(myLabelNameHere,"0") end)
  4. You can figure it out by yourself It's not really that hard.
  5. https://forum.multitheftauto.com/viewtopic.php?f=91&t=46798&sid=1ad4be054f61e0cd6479f64dfdb7a7a1 I just wrote an answer to that topic.. It's easy to modify from that.
  6. Well for the client: addEvent("getLabelTxt",true) addEventHandler("getLabelTxt",getRootElement(), function() textt = guiGetText(mylabelnamehere) -- PUT YOUR LABEL NAME HERE triggerServerEvent("saveLabelTxt",getLocalPlayer(),getLocalPlayer(),textt) -- we will send it to the server end) and the server: function getTextQuit() triggerClientEvent(source,"getLabelTxt",getRootElement()) -- trigger client end addEventHandler("onPlayerQuit",getRootElement(),getTextQuit) -- save addEvent("saveLabelTxt",true) addEventHandler("saveLabelTxt",getRootElement(), function(player,text) playeraccount = getPlayerAccount(player) if (playeraccount) and (text) then setAccountData(playeraccount,"number",tonumber(text)) -- save it end end) -- load function loadTextNumb() playeraccount = getPlayerAccount(source) if (playeraccount) then number = getAccountData(playeraccount,"number") -- DO WHATEVER YOU WANT WITH THE NUMBER ARGUEMENT end end addEventHandler("onPlayerLogin",getRootElement(),loadTextNumb) The code looks messy and I don't guarantee that it'll work.
  7. Hello Perfect, lets assume you create your blip. Create it like this. perfectBlip = createBlip ( 0, 0, 0 ) -- now destroy it destroyElement(perfectBlip) And destroy it with destroyElement.
  8. All servers "sold" out. Could a moderator lock this
  9. Sure, add my... No ... I think I have your MSN already?
  10. Nothing can be DDoS proof in 100%. And I wouldn't call blocking access to the server as "hacking". If I have more time - I'd like to take one (around 20 slot would be enough) - but I don't have time right now, too bad for me, huh? Yeah, I know.. But it will protect the "noobiest" ddos attacks, also it can't be hacked, there isn't anything that is installed as root.. Yeah, ask me if you need a server.
  11. Hey, I'm offering FREE MTA:SA hosting, because I have so much space on my dedicated server Some specs: RAM: 6GB Processor: Quad Xeon X3430 Network Connection: 1GBIT/1GBIT Location: Amsterdam, Netherlands (Yes, I know the game-monitor says the servers are in UK, but the dedi uses old IP range.. You can trace the IP if you really need proofs ) Slots you can get: 100 FTP: Yes IP: 62.18.252.174 This dedi is DDoS proof, so it can't be hacked. Contact me via PM if you want one, only three left
  12. I think he is speaking about DDoS, he's network/server is Ddossed and it's "frozen"
  13. Yeah you did, didn't you started the insulting? I don't really like you, first of all, when somebody is suggesting a great update, you come and yell, insult the writer of topic and so. Maybe look into mirror?
  14. Oh my f*cking god. Are you afraid writing your nick with capital letters will hurt your ego?
  15. Hmm, well. I think the current list really sucks. I'm not saying I have non-popular server, I actually got one very famous one, but it's true. Varez, even if there is a really good server, better than valhalla and it wont get the "start" players (10 players daily) it wont never get popular, everybody just ignores all those "less people" servers. Example, gamenet.fi WFS was one of the most wanted server on DP2.3, when moved to MTA 1.0 WFS died, it didn't come online for like two months and when finally got it up, nobody came there because of it was ignored because it was on the bottom on the list. In fact, this update would be one of the bests updates I have ever seen around here. I'm afraid varez or anyone else don't wanna this update because they are scaring that they will loose some players from their own servers... I think many people would love this update, really love it. It would bring maybe new players to MTA, also. Varez, of course if you have patience, you will get the players (I waited almost two years for it) and now I finally got those players. But instead of waiting those players we would take this update. Uhm, well. I have spoken. Thumbs up for Glo Best Regards Taalasmaa
  16. Yes, I need testers. That's actually why I havent updated this resource; I don't have testers. You can report bugs to me and I will fix. Somebody told me that s0beit detector bugs, dunno about it. Regards Taalasmaa
  17. Yeah, thanks 50p. <?php include( "mta_sdk.php" ); $input = mta::getInput(); $input[0]; mta::doReturn($input[0]); ?> This is my PHP file function messages() callRemote ( "http://**.***.***.**/stats.php", outputDebugString, "works" ) -- I hided my ip. end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),messages) This is my lua file it debugs this "works" to server debug. I just want to know how can I get this "works" to my sites too. In my sites (stats.php) it just shows as [null].
  18. https://wiki.multitheftauto.com/wiki/AttachElements With this function you can attach two elements. Don't except me to write the code for you. Oh well, I wrote a bit. function attachHand ( source, commandName,objID,x,y,z,rx,ry,rz ) car = getPedOccupiedVehicle(source) if (car) then object = createObject(tonumber(objID),0,0,0); attachElements ( car, object, tonumber(x), tonumber(y), tonumber(z), tonumber(rx), tonumber(ry), tonumber(rz) ); else outputChatBox("You must be in car!",source,255,0,0); end end addCommandHandler ( "attach", attachHand ) This works like /attach OBJECTID,x,y,z,rx,ry,rz I'm not sure what you wanted. Edit: It's untested dunno if works.
  19. Oh, I found this: https://wiki.multitheftauto.com/wiki/PHP_SDK Gonna try it, I'll ask if i have any questions EDIT: can I call to php with callRemote, or can I just call to other servers with it? EDIT2: of course i can never mind. function chatz ( message, type ) callRemote ( "http://www.gamenet.fi/stats.php", getResourceName(getThisResource()), "phpFunction", chatBoxFunction, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), chatz ) How can I make function to PHP that takes this?
  20. Hello, MTA. I got little problems, I wanted to make webstats system (wanted levels) and so on, but I don't know even where to start I'm not asking you to script a system or any scripts to me, but is there any tutorials/sites (wiki?) where I can find more information about sending data from server to html (php). I can script lua very well (scripted for a year). I started to learn php months ago. I'm just too newbie in sending datas from lua to php, so simply, I'm just looking for sites where I can learn to send datas and so on, so I can implement my websystem (I can maybe put it to community after done it). Anyway, any help would be great. Thanks. Regards, Taalasmaa.
  21. I could make it able to decide by user.. Like there would be in meta.xml setting called JetpackDetection="true" or false, if it's true then it detects, if false then no. Anyway, I'll improve and fix this when I have time, now I'm busy with my RPG project.
  22. Be more specific, what's kick reason? Edit: It can't kick off from s0beit, if it detects s0beit, it just kills you, so be more specific
  23. Taalas-Anticheat finally released! Special thanks to PhatLooser! This is other anticheat than PhatLooser's, made by me, PhatLooser helped me to make this better. ---------- Detections: ---------- Airbrake(Vehicle and human) S0beit detector(Thanks to PhatLooser) Vehicle speed Jetpack Weapons Flying vehicle ---------- More detections coming in v0.2 version! For more information go to forums ! BTW. don't mess this with PhatLooser's anticheat. This is different anticheat, s0beit detector is made by PhatLooser, he gave permission to use it. Airbrake detections are made by me, PhatLooser just helped me out. Also all other detections are made by me. Regards Taalasmaa Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=845
×
×
  • Create New...