Jump to content

Taalasmaa

Members
  • Posts

    197
  • Joined

  • Last visited

Details

  • Gang
    SinCity Gaming

Recent Profile Visitors

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

Taalasmaa's Achievements

Mark

Mark (16/54)

0

Reputation

  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?
×
×
  • Create New...