Jump to content

Spice

Members
  • Posts

    51
  • Joined

  • Last visited

Everything posted by Spice

  1. Spice

    Timer

    you're welcome i have edited my 2 nd post check it please
  2. Spice

    Timer

    thanks, another question how to make a var for set timer function setTimer (outputChatBox, 10000, 1,"Congratulations you have done the mission successfuly and got "..money" $", thePlayer) local money = setTimer (givePlayerMoney, 10000, 1, thePlayer, math.random(1000,10000)) I tried it like that but it's not working
  3. Spice

    Timer

    function marker (thePlayer) outputChatBox ("Loading the Cargo, Please wait", thePlayer, 255, 255, 0) startPaidLS (thePlayer) end function startPaidLS (thePlayer) setTimer (outputChatBox, 10000, 1,"Go to "..zone.." deliver your cargo", thePlayer) How to make the second function (startPaidLS) start after 10 second, i know i should use setTimer but how it would be like .
  4. Spice

    Progress bar

    function createprog () loadingprog = guiCreateProgressBar(475, 653, 330, 33, false) curprog = guiProgressBarGetProgress (loadingprog) setTimer (guiProgressBarSetProgress, 1000, 10, loadingprog, curprog+10) setTimer (destroyElement, 10010, 1, loadingprog) end Why the progress bar don't increase except once (to 10 %) ? Why the progress bar don't get destroyed after 10 secs
  5. Spice

    script

    I fixed it thanks bro
  6. Spice

    script

    The vehicle don't get created
  7. Spice

    script

    still the same error, i think war returns true not the vehicle
  8. Spice

    script

    Thanks man but [23:00:46] WARNING: Pilot\server.lua:18: Bad argument @ 'warpPedIntoVehicle' [Ex pected vehicle at argument 2, got boolean]
  9. Spice

    script

    -- server function Vehicle (Model) local x, y, z = getElementPosition(source) local war = createVehicle (Model, x, y, z) warpPedIntoVehicle (thePlayer, war) end addEvent ( "create", true ) addEventHandler ( "create", root, Vehicle) --Client Model = guiGridListGetItemText ( grid1, guiGridListGetSelectedItem ( grid1 ), 1 ) triggerServerEvent ( "create", resourceRoot, Model ) [22:51:54] WARNING: Pilot\server.lua:18: Bad argument @ 'warpPedIntoVehicle' [Ex pected ped at argument 1, got nil] Why it's not wokring
  10. Spice

    request

    Hello guys i want the script that outputs the money player spent or received on the bottom right screen
  11. Spice

    giveWeapon

    not working debug : [11:56:28] ERROR: ammoshop\server.lua:29: attempt to perform arithmetic on globa l 'piscurrammo' (a boolean value)
  12. Spice

    giveWeapon

    thanks, another small help please piscurrammo = getPedTotalAmmo ( source, 22 ) setWeaponAmmo ( source, 22, piscurrammo+amm, 17 ) why this isn't working, amm is guigettext from a editbox
  13. Spice

    giveWeapon

    addEvent("givepistol",true) addEventHandler("givepistol",root, function () local moneyammount = 10000 local money = getPlayerMoney (source) >= moneyammount if not getSlotFromWeapon ( 16 ) then if money then local tk = takePlayerMoney (source, 10000) if tk then giveWeapon (source, 16, 1, true) end else outputChatBox ("You need to have atleast 10000 $ to buy this weapon") end else outputChatBox ("You already got this weapon") end end ) I want that if the player have the wep this out put to him "You already got this weapon"
  14. Spice

    marker

    Both not working
  15. Spice

    marker

    local markers = { {296.20737, -37.42688, 1001.51563, 1}, {312.10248, -165.32639, 999.60101, 6}, {288.38971, -106.55548, 1001.51563, 6}, {277.55972, -37.21804, 1001.60779, 1}, {292.98145, -103.60979, 1008.27344, 6}, {293.52847, -80.34721, 1001.51563, 4}, {293.24643, -115.71572, 1008.27344, 4}, {312.62921, -149.50658, 1007.67291, 6}, {308.24817, -140.86179, 999.60156, 7}, } function markerscreate () for index, value in ipairs ( markers ) do local mx,my,mz,mi = unpack( markers[index] ) mar = createMarker (mx, my, mz-1, "cylinder", 1.5, 255, 255, 255, 180) setElementInterior (mar, mi, mx, my, mz-1) end end addEventHandler( "onClientResourceStart", resourceRoot, markerscreate ) function markerhit() if ( source == mar) then guiSetVisible (ammowin, true) showCursor (true) end end addEventHandler( "onClientMarkerHit", resourceRoot, markerhit ) ammowin = guiCreateWindow(351, 132, 590, 482, "Ammunations Shop", false) guiWindowSetSizable(ammowin, false) pistol = guiCreateButton(10, 27, 116, 40, "Pistol\n10,000 $", false, ammowin) pistolammo = guiCreateButton(162, 27, 116, 40, "Pistol Ammo\n5$ / ammo", false, ammowin) Desert = guiCreateButton(10, 77, 116, 40, "Desert Eagle\n25,000 $", false, ammowin) desertammo = guiCreateButton(162, 77, 116, 40, "Desert Eagle Ammo\n7$ / ammo", false, ammowin) shotgun = guiCreateButton(10, 126, 116, 40, "Shotgun\n40,000 $", false, ammowin) shotgunammo = guiCreateButton(162, 126, 116, 40, "Shotgun Ammo\n9$ / ammo", false, ammowin) sawnoffshotgun = guiCreateButton(10, 176, 116, 40, "Sawn-Off Shotgun\n35,000 $", false, ammowin) swanshotgunammo = guiCreateButton(162, 176, 116, 40, "Sawn-Off Ammo\n8$ / ammo", false, ammowin) combatshotgun = guiCreateButton(10, 226, 116, 40, "Combat Shotgun\n40,000 $", false, ammowin) combatammo = guiCreateButton(162, 226, 116, 40, "Combat Ammo\n9$ / ammo", false, ammowin) Uzi = guiCreateButton(10, 276, 116, 40, "Uzi\n30,000 $", false, ammowin) uziammo = guiCreateButton(162, 276, 116, 40, "Uzi Ammo\n6$ / ammo", false, ammowin) MP5 = guiCreateButton(10, 326, 116, 40, "MP5\n30,000 $", false, ammowin) tec9ammo = guiCreateButton(162, 376, 116, 40, "TEC-9 Ammo\n6$ / ammo", false, ammowin) TEC9 = guiCreateButton(10, 376, 116, 40, "TEC-9\n25,000 $", false, ammowin) ak47 = guiCreateButton(303, 27, 116, 40, "AK-47\n60,000 $", false, ammowin) m4 = guiCreateButton(303, 77, 116, 40, "M4\n60,000 $", false, ammowin) countryrifle = guiCreateButton(303, 127, 116, 40, "Country Rifle\n70,000 $", false, ammowin) sniperrifle = guiCreateButton(303, 176, 116, 40, "Sniper Rifle\n90,000 $", false, ammowin) miniigun = guiCreateButton(303, 226, 116, 40, "Minigun\n1,000,000 $", false, ammowin) MP5ammo = guiCreateButton(162, 326, 116, 40, "MP5 Ammo\n7$ / ammo", false, ammowin) ak47ammo = guiCreateButton(443, 27, 116, 40, "AK-47 Ammo\n11$ / ammo", false, ammowin) m4ammo = guiCreateButton(443, 76, 116, 40, "M4 Ammo\n11$ / ammo", false, ammowin) countryrifleammo = guiCreateButton(443, 127, 116, 40, "Country Rifle Ammo\n15$ / ammo", false, ammowin) sniperrifleammo = guiCreateButton(443, 177, 116, 40, "Sniper Rifle Ammo\n15$ / ammo", false, ammowin) minigunammo = guiCreateButton(443, 227, 116, 40, "Minigun Ammo\n3$ / ammo", false, ammowin) close = guiCreateButton(152, 426, 268, 34, "Close", false, ammowin) grenade = guiCreateButton(303, 326, 266, 40, "Grenade\n1,000$ / grenade", false, ammowin) teargas = guiCreateButton(303, 277, 266, 39, "Tear Gas\n1,100$ / tear gas", false, ammowin) satchel = guiCreateButton(303, 376, 266, 40, "Satchel\n1,000 $ / satchel", false, ammowin) guiSetVisible (ammowin, false) why the gui don't get shown ?
  16. Spice

    fix

    I want to make them with table
  17. Spice

    fix

    local markers = { {1368.45532, -1279.79651, 13.54688}, {777.17426, 1871.52454, 4.90737}, } function markerscreate () local mx,my,mz = unpack(markers[index]) createMarker (mx, my, mz, "arrow", 2, 230, 0, 0, 180) end addEventHandler( "onClientResourceStart", resourceRoot, markerscreate ) Can anyone fix this ? and tell me please why it's not working
  18. Spice

    Nearest spawn

    Hello guys, i want to make the player get spawned to the nearest spawn point (the spawn points in the table) so how can i do that ? locations = { {x = 2030.73840, y = -1404.19531, z = 17.26210} {x = 1178.60681 -1324.14050 14.12840} } function loc () spawnPlayer (source, locations[1]["x"], locations[1]["y"], locations[1]["z"]) end addEventHandler ( "onPlayerWasted", getRootElement(), loc )
  19. Spice

    Account Data

    working, thanks
×
×
  • Create New...