Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. lol, isn't there another topic about this GUI: viewtopic.php?f=91&t=43167
  2. Copy the Server-side again... when your setting the player stats, don't add a boolean at the end, there's only 3 value's you need to enter: setPedStat
  3. Client-side: addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(224,131,364,323,"Umbrella Corperation's Weapon Shop!",false) guiSetVisible(GUIEditor_Window[1], false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Window[2] = guiCreateWindow(0.25,0.35,0.5,0.2,"UPS!",true) button = guiCreateButton (0.35,0.6,0.3,0.2,"ok",true,GUIEditor_Window[2]) guiSetAlpha(GUIEditor_Window[2],1) label = guiCreateLabel (0.35,0.25,0.5,0.2,"Not enough money for that weapon",true,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[2], false) GUIEditor_Button[1] = guiCreateButton(19,39,80,45,"Buy Dildo Large: $500000",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(144,37,80,45,"Buy Dildo Small: $250000",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(266,36,80,45,"Buy 50 RPG: $15000",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(145,119,79,50,"Buy 1000 Pistol Skill: $500000",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(266,120,85,51,"Buy 1000 Dual Uzi Skill: $1000000",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,120,79,50,"Buy 1000 SawnOff Skill: $750000",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(14,196,88,73,"images/molotov.png",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(29,271,59,43,"Buy 5 Cocktales: $60000",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(273,190,75,80,"images/minigun.png",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(280,271,70,43,"Buy 10000 Miniguns: $100000",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(114,200,145,99,"EXIT",false,GUIEditor_Window[1]) end ) addEventHandler("onClientGUIClick",root,function()--You've triggered onClientGUIClick, the source of the event is the button that the player/client clicked if (source == GUIEditor_Button[29]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[9]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[30]) then guiSetVisible (GUIEditor_Window[2],false) showCursor (false) elseif (source == GUIEditor_Button[1]) then money = getPlayerMoney (localPlayer) if (money >= 500000) then outputChatBox ("You bought a Dildo Large! For: $500000",225,225,0) takePlayerMoney(500000) triggerServerEvent ("give10",getLocalPlayer(),give10) else guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) end elseif (source == GUIEditor_Button[2]) then money = getPlayerMoney (localPlayer) if (money >= 250000) then outputChatBox ("You bought a Dildo Small! For: $250000",225,225,0) takePlayerMoney(250000) triggerServerEvent ("give11",getLocalPlayer(),give11) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[3]) then money = getPlayerMoney (localPlayer) if (money >= 150000) then outputChatBox ("You bought a... Seriously?! Nice try Troll!! For: $150000",225,225,0) takePlayerMoney(150000) triggerServerEvent ("give15",getLocalPlayer(),give15) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[8]) then money = getPlayerMoney (localPlayer) if (money >= 100000) then outputChatBox ("You Nab You Shouldnt Be A Troll! For: $100000",225,225,0) takePlayerMoney(100000) triggerServerEvent ("give14",getLocalPlayer(),give15) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[7]) then money = getPlayerMoney (localPlayer) if (money >= 60000) then outputChatBox ("You bought 5 Cocktails! For: $60000",225,225,0) takePlayerMoney(60000) triggerServerEvent ("give18",getLocalPlayer(),give18) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[5]) then money = getPlayerMoney (localPlayer) if (money >= 1000000) then outputChatBox ("You bought Dual Uzi Skill For: $1000000",225,225,0) takePlayerMoney(1000000) triggerServerEvent ("setPedStat75",getLocalPlayer()) -- you don't have to put the function as it is on the server-side and the event is attached to the function server side else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[4]) then money = getPlayerMoney (localPlayer) if (money >= 500000) then outputChatBox ("You bought Dual Pistol Skill For: $500000",225,225,0) takePlayerMoney(500000) triggerServerEvent ("setPedStat69",getLocalPlayer()) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[6]) then money = getPlayerMoney (localPlayer) if (money >= 750000) then outputChatBox ("You bought Dual Sawn Off Skill For: $750000",225,225,0) takePlayerMoney(750000) triggerServerEvent ("setPedStat73",getLocalPlayer()) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == button) then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],true) elseif (source == button) then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],true) end end) addEvent ("showGUI",true) addEventHandler ("showGUI",root,function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end) BTW, The source of the event "onClientGUIClick" is the button or the element the client/local player clicked: onClientGUIClick Server-side: marker1 = createMarker (295.239,-37.58,1000.515,"cylinder",1.5,0,0,225,100) marker2 = createMarker (295.48,-80.38,1000.51,"cylinder",1.5,0,0,225,100) marker3 = createMarker (290.28,-109.35,1000.51,"cylinder",1.5,0,0,225,100) marker4 = createMarker (211.25,1858.46,12.10,"arrow",1.5,0,0,225,100) pedammusf = createPed (179,290.187,-111.514,1001.51) setElementInterior(pedammusf,6) setPedFrozen(pedammusf,true) pedammulv = createPed (179,295.47,-82.53,1001.51) setElementInterior (pedammulv,4) setElementInterior (marker2,4) setElementInterior (marker1,1) setElementInterior (marker3,6) addEventHandler ("onMarkerHit",root,function(jugador) if (source == marker1) then triggerClientEvent (jugador,"showGUI",root) elseif (source == marker2) then triggerClientEvent (jugador,"showGUI",root) elseif (source == marker3) then triggerClientEvent (jugador,"showGUI",root) elseif (source == marker4) then triggerClientEvent (jugador,"showGUI",root) end end) addEvent("give10",true) addEventHandler("give10",root,function() giveWeapon (client,10,1,true) end) addEvent("give11",true) addEventHandler("give11",root,function() giveWeapon (client,11,1,true) end) addEvent("give15",true) addEventHandler("give15",root,function() giveWeapon (client,15,1,true) end) addEvent("give14",true) addEventHandler("give14",root,function() setWeaponProperty (client,14,1,true) end) addEvent("setPedStat75",true) addEventHandler("seTPedStat75",root,function() setPedStat (client,75,999) end) addEvent("setPedStat73",true) addEventHandler("setPedStat73",root,function() setPedStat (client,73,999) end) addEvent("setPedStat69",true) addEventHandler("setPedStat69",root,function() setPedStat (source,69,999) end)
  4. Jaysds1

    Sound drops

    Can you download and run this MTADiag and post the generated Pastebin url here please
  5. ok, If you want more ram, here's an example of what you need: 2 cores 40GB HDD space 2GB guaranteed RAM 4GB burstable RAM 1TB traffic (1Gbit burst) 1 IP addresses 10 IPv6 addresses
  6. Worked on version: > ="Puma-Markers.lua" type="client" /> src="Icons/Teleport.png" /> src="Icons/TeleportD.png" /> src="Icons/SlowDown.png" /> src="Icons/SpeedUp.png" /> src="Icons/Stop.png" /> src="Icons/Fire.png" /> src="Icons/BlowUp.png" /> src="Icons/Jump.png" /> src="Icons/Flip.png" /> src="Icons/Reverse.png" /> src="Icons/Rotate.png" /> src="Icons/CarsFly.png" /> src="Icons/CarsSwim.png" /> src="Icons/Gravity.png" /> src="Icons/Magnet.png" /> src="Icons/Beer.png" /> src="Icons/Camera.png" /> src="Icons/FlatTires.png" /> src="Icons/Freeze.png" /> src="Icons/GameSpeed.png" /> src="Icons/Color.png" /> src="Icons/Weather.png" /> src="Icons/Time.png" /> src="Icons/Text.png" /> src="Icons/AntiSC.png" /> src="Icons/X.png" /> src="music.mp3" /> ="music.lua" type="client"/> ="client.lua" type="client"/> gamemode="race" type="map" name="[DM]e-Hate -Vol 3- Levels 1,2,3" author="e-Hate" version="1.1" description="xx"/> src="[DM]-e-Hate--Vol-3-2222.map" dimension="0" /> > name="#skins" value='[ "cj" ]'/> name="#maxplayers" value="[ 32 ]"/> name="#gamespeed" value="[ 1 ]"/> name="#ghostmode" value='[ "true" ]'/> name="#time" value="1:1">> name="#vehicleweapons" value='[ "true" ]'/> name="#minplayers" value="[ 0 ]"/> name="#weather" value="[ 13 ]"/> name="#gravity" value="[ 0.008000 ]"/> name="#waveheight" value="[ 0 ]"/> name="#respawntime" value="[ 5 ]"/> name="#locked_time" value="[ false ]"/> name="#duration" value="[ 1800 ]"/> name="#respawn" value='[ "none" ]'/> >> Original Version: > ="Puma-Markers.lua" type="client" /> src="Icons/Teleport.png" /> src="Icons/TeleportD.png" /> src="Icons/SlowDown.png" /> src="Icons/SpeedUp.png" /> src="Icons/Stop.png" /> src="Icons/Fire.png" /> src="Icons/BlowUp.png" /> src="Icons/Jump.png" /> src="Icons/Flip.png" /> src="Icons/Reverse.png" /> src="Icons/Rotate.png" /> src="Icons/CarsFly.png" /> src="Icons/CarsSwim.png" /> src="Icons/Gravity.png" /> src="Icons/Magnet.png" /> src="Icons/Beer.png" /> src="Icons/Camera.png" /> src="Icons/FlatTires.png" /> src="Icons/Freeze.png" /> src="Icons/GameSpeed.png" /> src="Icons/Color.png" /> src="Icons/Weather.png" /> src="Icons/Time.png" /> src="Icons/Text.png" /> src="Icons/AntiSC.png" /> src="Icons/X.png" /> src="music.mp3" /> ="music.lua" type="client">> ="client.lua" type="client">> ="cliente.lua" type="client" /> ="music.lua" type="client" /> ="client.lua" type="client" /> ="Puma-Markers.lua" type="client" /> gamemodes="race" type="map" name="[DM] eHate -Vol 3- Levels 123" author="eHate" version="1.0.5" description="map">> src="[DM]-e-Hate--Vol-3-2222.map" dimension="0">> > name="#minplayers" value="[ 1 ]">> name="#maxplayers" value="[ 32 ]">> name="#gravity" value="[ 0.008000 ]">> name="#weather" value="[ 13 ]">> name="#time" value="2:0">> name="#locked_time" value="[ true ]">> name="#waveheight" value="[ 0 ]">> name="#gamespeed" value="[ 1 ]">> name="#ghostmode" value='[ "true" ]' /> name="#vehicleweapons" value='[ "true" ]' /> name="#duration" value="[ 600 ]" /> >>
  7. your going to have to use a for i,v in ipairs()do to narrow down the rows or to get the text from the gui gridlist I think this is right: for i=1,guiGridListGetRowCount(GRIDLIST) do if(guiGridListGetItemText(GRIDLIST,i,1)==string)then guiGridListSetSelectedItem(GRIDLIST,i,1) end end
  8. change the info line to this: gamemode="race" type="map" name="[DM] eHate -Vol 3- Levels 123" author="eHate" version="1.0.6" description="map" /><? You put gamemodes instead of gamemode ?>
  9. What weapons are you using for dual wield?
  10. That's suppose to be src="music.mp3" />
  11. Did you created this in the map editor?
  12. Jaysds1

    Car spawn

    It should be able to respawn in the same place after it explodes..
  13. What resource do you have? I know this isn't the Racemode plugin
  14. np, post back if it worked or didn't
  15. UPDATED! BTW, Thanks for telling me, I forgot about them
  16. here's a preview: table = executeSQLQuery("SELECT * FROM Spawn") --[[ table = { { colname1=value1, colname2=value2, ... }, { colname1=value3, colname2=value4, ... }, ... } ]] |name|gang|city|type|x|y|z|wep1|wep2|wep3|wep4|wep5|wep6|skin1|skin2|skin3| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
  17. instead of "onPlayerDamage" use "onPedDamage"
  18. That's right, but if he downloaded it and added resources to the server then there's a slight chance that he didn't put it in the resource folder
  19. like this: { { colname1=value1, colname2=value2, ... }, { colname1=value3, colname2=value4, ... }, ... }
  20. Just visit the IRC: irc://irc.gtanet.com/mta or IRC(Scripting help): irc://irc.gtanet.com/mta.scripting
  21. Do you have a resources folder? It's suppose to be located where the mtaserver.exe is. If you do, where do you keep the resource?
  22. it returns the a table full with the results: https://wiki.multitheftauto.com/wiki/ExecuteSQLQuery
×
×
  • Create New...