Jump to content

orcun99

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by orcun99

  1. orcun99

    playsound

    works now thank u
  2. orcun99

    playsound

    triggerClientEvent ( root, "sess", root ) ok I changed to triggerClientEvent ( source, "sess", root ) but still don't work now there is no play song no one can't hear song
  3. orcun99

    playsound

    server addEvent("sess",true) function asd (player) local sound = playSound("money.mp3") setSoundVolume(sound, 1.0) addEventHandler("sess", getRootElement(), asd) client function pickupUse ( player ) if getElementModel(source) == 1212 then triggerClientEvent ( root, "sess", root ) end end addEventHandler ( "onPickupUse", resourceRoot, pickupUse ) I want just localplayer player can hear this song not all
  4. works thank u but one more think I need if player onpickup then giveplayer money +1000
  5. I don't know how to use getzonename can u edit my code please ? please don't send wiki links
  6. server side: lvcol = createColCircle ( 1796.6412353516,1740.2864990234, 1250 ) --LAS VENTURAS COOLSAPEHİT function playerJustGotDied(ammo, attacker, weapon, bodypart) outputChatBox("öldün") x, y, z = getElementPosition ( source ) local money = createPickup ( x, y, z, 3, 1212 ) end addEventHandler("onPlayerWasted", getRootElement(), playerJustGotDied); function pickupUse ( player ) givePlayerMoney ( player, 10000 ) end addEventHandler ( "onPickupUse", money, pickupUse ) function giris( player ) outputChatBox("You will cant use pvp command in Las Venturas",player) end addEventHandler( "onColShapeHit", lvcol, giris ) if the player dies in lasventuras, I want the money pickup out where he died. but if the player not in dies in lasventuras then there is no pickup out when he died
  7. orcun99

    little help

    lvcol = createColCircle ( 1796.6412353516,1740.2864990234, 1250 ) function player_Wasted ( ammo, attacker, weapon, bodypart ) outputChatBox("öldün") end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function giris( player ) outputChatBox("You will cant use pvp command in Las Venturas",player) end addEventHandler( "onColShapeHit", lvcol, giris ) SERVER SİDE MY CODE I need if player oncolshapehit and die then outputchatbox("öldün")
  8. orcun99

    timer help

    so where is wrong? function paraVer(para) local uyelik = getPlayerAccount(source) local kumar = getAccountData(uyelik, "aq", true) local time = false if (kumar) then outputChatBox("you are already used command you need wait 10min") if getTickCount()-time>=10000 then -- trying 10sec time = getTickCount() setAccountData ( uyelik, "aq", false ) outputChatBox("10min expried now you can command again") return end for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #0589f9"..para.."$ #e4e4e4kazandi..!",player, 255,255,255,true ) end givePlayerMoney(source, para ) setAccountData ( uyelik, "aq", true ) end end addEvent("moneyVer", true) addEventHandler("moneyVer", getRootElement(), paraVer)
  9. orcun99

    timer help

    yes I trying to limit a command use to once every 10mins I don't know how to use getTickCount pls don't send me wiki links can u edit my code pls?
  10. orcun99

    timer help

    I tried this command but don't works timer works auto I wanna just """" If (kumar) then""" function mainFunction() outputChatBox ("you need wait 10min") setTimer ( function() setAccountData ( uyelik, "aq", false ) outputChatBox ( "10min expried you can use command again" ) end, 60000*10, 1 ) end full code function paraVer(para) local uyelik = getPlayerAccount(source) local kumar = getAccountData(uyelik, "aq", true) if (kumar) then outputChatBox("you are already used command you need wait 10min") mainFunction() -- WRONG HERE TIMER STARTS AUTO setAccountData ( uyelik, "aq", false ) outputChatBox("10min expried now you can command again") return end for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #0589f9"..para.."$ #e4e4e4kazandi..!",player, 255,255,255,true ) end givePlayerMoney(source, para ) setAccountData ( uyelik, "aq", true ) end addEvent("moneyVer", true) addEventHandler("moneyVer", getRootElement(), paraVer)
  11. the problem is the code I wrote above I need when user command /spin 333 all right done but I need timer if user again try command message outputChatBox("you need wait 10min to use this command") after 10min message ("you can use /spin now 10min expried")
  12. kazanmasansi = 50 ----%50 kazanma şansı ayarladım dediğin gibi değiştirebilirsin bu sayıyı local nextSpinTime = 0 local spinDelay = 20000*1 -- 10 sec function spin(cmd, para) local timeNow = getTickCount() local kumar = math.random(1,100) local money = getPlayerMoney(source) para = tonumber(para) if timeNow > nextSpinTime then nextSpinTime = timeNow + spinDelay outputChatBox("kodu tekrar kullanmadan önce 10dakika beklemelisin",player) else if para > 10000 then outputChatBox("100-10000 arasında bir sayı gir",player) return end if para < 100 then outputChatBox("100-10000 arasında bir sayı gir",player) return end if (money < para) then outputChatBox("paran yetersiz",player) return end if kumar > (100-kazanmasansi) and (money > para) then outputChatBox("oynanıyor..",player) triggerServerEvent("moneyVer", localPlayer, para ) else triggerServerEvent("moneyAl", localPlayer, para) end end end addCommandHandler("spin",spin)
  13. local nextSpinTime = 0 local spinDelay = 20000*1 -- 10 sec function spin(cmd, para) local timeNow = getTickCount() local kumar = math.random(1,100) local money = getPlayerMoney(source) para = tonumber(para) if timeNow > nextSpinTime then nextSpinTime = timeNow + spinDelay outputChatBox("kodu tekrar kullanmadan önce 10dakika beklemelisin",player) else if para > 10000 then outputChatBox("100-10000 arasında bir sayı gir",player) return end if para < 100 then outputChatBox("100-10000 arasında bir sayı gir",player) return end if (money < para) then outputChatBox("paran yetersiz",player) return end if kumar > (100-kazanmasansi) and (money > para) then outputChatBox("oynanıyor..",player) triggerServerEvent("moneyVer", localPlayer, para ) else triggerServerEvent("moneyAl", localPlayer, para) end end end addCommandHandler("spin",spin) where is wrong?
  14. thank u all now scripts works as well I just need timer function for example x user first time use this command /spin 500 all done okey but second time outputChatBox("you need wait 10min before using this command again.",player) I need this after 10 mins outputChatBox("you can /spin now")
  15. I have some debug kazanmasansi = 50 ----%50 kazanma şansı ayarladım dediğin gibi değiştirebilirsin bu sayıyı function spin(source, cmd, para) local kumar = math.random(1,100) local money = getPlayerMoney(source) local para = tonumber(para) outputChatBox(para) if para > 10001 and para < 99 then outputChatBox("beetwen 100-10000 ",player) return end if (money < para) then outputChatBox("no enough money",player) return end if kumar > (100-kazanmasansi) and (money > para) then outputChatBox("playing..",player) triggerServerEvent("moneyVer", localPlayer, para ) else triggerServerEvent("moneyAl", localPlayer, para) end end addCommandHandler("spin",spin) server function paraAl(para) for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #c80000"..para.."$ #e4e4e4kaybetti..!",player, 255,255,255,true ) end takePlayerMoney(source, para ) end addEvent("moneyAl", true) addEventHandler("moneyAl", getRootElement(), paraAl) function paraVer(para) for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #0589f9"..para.."$ #e4e4e4kazandi..!",player, 255,255,255,true ) end givePlayerMoney(source, para ) end addEvent("moneyVer", true) addEventHandler("moneyVer", getRootElement(), paraVer) when I try /spin 202 error client side : line 8 attempt to compare number nil if (tonumber(para) > 10000) then still don't work I tried this code same error
  16. Thank you. but I need one more thing. I want the command to be used only once in 10 minutes. /spin you already use this command . you should wait 10min before again using this command sorry for bad england
  17. this command just select a one number for example user command : /spin 333 (333 = para and min:100 max : 10000 )
  18. client kazanmasansi = 50 ----%50 kazanma şansı ayarladım dediğin gibi değiştirebilirsin bu sayıyı function spin(source, cmd, para) local kumar = math.random(1,100) local money = getPlayerMoney(source) local para = math.min = (100) and math.max (10000) outputChatBox(para) if para > 10001 and para < 100 then outputChatBox("100-10000 arasında bir sayı gir",player) return end if (money < 999) then outputChatBox("paran yetersiz",player) return end if kumar > (100-kazanmasansi) and (money > 999) then outputChatBox("oynanıyor..",player) triggerServerEvent("moneyVer", localPlayer, para ) else triggerServerEvent("moneyAl", localPlayer, para) end end addCommandHandler("spin",spin) server function paraAl(para) for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #c80000"..para.."$ #e4e4e4kaybetti..!",player, 255,255,255,true ) end takePlayerMoney(source, para ) end addEvent("moneyAl", true) addEventHandler("moneyAl", getRootElement(), paraAl) function paraVer(para) for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #0589f9"..para.."$ #e4e4e4kazandi..!",player, 255,255,255,true ) end givePlayerMoney(source, para ) end addEvent("moneyVer", true) addEventHandler("moneyVer", getRootElement(), paraVer) para = beetwen 100-10000 I can't do this and I need timer every 10min one time use /spin command I can't do this to
  19. I think you don't understand for example lvcol = createColCircle ( 1796.6412353516,1740.2864990234, 1250 ) function qwe(thePlayer) outputChatBox("you can't use /pvp cause you in lv.") end addEventHandler( "onColShapeHit", lvcol, qwe ) function qwe2 (thePlayer) outputChatBox("ayrıldın") local rnd = math.random( 1, #spawns ) setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) end addEventHandler ( "onColShapeLeave", root, qwe2 ) addCommandHandler("pvp",qwe2) solved thanks all
  20. local spawns = { { 1936.1899414063, 1622.6533203125, 72.2578125, 90 }, --1 { 2155.63671875, 1483.9974365234, 24.140625, 90}, --2 { 2023.1564941406, 1436.7003173828, 10.8203125, 90 }, --3 { 2121.4245605469, 1484.5670166016, 10.8203125, 90 }, --4 { 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5 { 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6 } function spawn( player ) local rnd = math.random( 1, #spawns ) setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) end addCommandHandler("pvp",spawn) if the player is in the field that I set as spawns, I want the player to be unable to use the /PvP command again. I Want This command not to be used in Las venturas.
×
×
  • Create New...