Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. ok i will test ...and thanks dude.
  2. You're solution wont help.
  3. no errors !! its working fine but when player reach 100 exp or 101 exp he dont level up. anything else?
  4. I have another trouble if player like example have in experience 112 he don't move to level 1. P.S : It was working fine. here's the lua exports.scoreboard:scoreboardAddColumn("Level") local levels = {[100] = 1, [200] = 2, [300] = 3, [400] = 4, [500] = 5, [1000] = 6, [2500] = 7, [5000] = 8, [7000] = 9, [10000] = 10, [15000] = 11, [20000] = 12, [30000] = 13, [55000] = 14, [65000] = 15} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "ExP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "ExP", tonumber(H)+math.random ( 10, 80 ) ) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." ! ") triggerClientEvent ( killer, "playSound", killer ) end end local H = getElementData ( source, "ExP" ) or 0 setElementData ( source, "ExP", tonumber ( H ) - math.random ( 5, 50 ) ) end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "lvl") or "0") setElementData(source, "ExP", getAccountData(account, "exp") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "lvl", getElementData(thePlayer, "Level")) setAccountData (theAccount, "exp", getElementData(thePlayer, "ExP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end)
  5. I have another trouble if player like example have in experience 112 he don't move to level 1. P.S : It was working fine. here's the lua exports.scoreboard:scoreboardAddColumn("Level") local levels = {[100] = 1, [200] = 2, [300] = 3, [400] = 4, [500] = 5, [1000] = 6, [2500] = 7, [5000] = 8, [7000] = 9, [10000] = 10, [15000] = 11, [20000] = 12, [30000] = 13, [55000] = 14, [65000] = 15} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "ExP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "ExP", tonumber(H)+math.random ( 10, 80 ) ) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." ! ") triggerClientEvent ( killer, "playSound", killer ) end end local H = getElementData ( source, "ExP" ) or 0 setElementData ( source, "ExP", tonumber ( H ) - math.random ( 5, 50 ) ) end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "lvl") or "0") setElementData(source, "ExP", getAccountData(account, "exp") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "lvl", getElementData(thePlayer, "Level")) setAccountData (theAccount, "exp", getElementData(thePlayer, "ExP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end)
  6. Fixed i added ammo to this line function win(killer, weapon, bodypart) function win(ammo, killer, weapon, bodypart)
  7. Hello all i want set this code to onPlayerWasted i tried it but dont want to work here is the lua exports.scoreboard:addScoreboardColumn("WepPoints",getRootElement(),6,60) function PlayerKill ( killer, weapon, bodypart) local slot = getPedWeapon(killer) for _,player in ipairs(getElementsByType("player")) do bindKey(player,"next_weapon",PlayerKill) bindKey(player,"previous_weapon",PlayerKill) if (killer and killer ~= source) then if ( bodypart == 9) then setPedStat(killer, stat, getPedStat(killer, stat)+5) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == -- s8) --> then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == 7) then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == 6) then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == 5) then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == 4) then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) elseif (killer and killer ~= source) then if ( bodypart == 3) then setPedStat(killer, stat, getPedStat(killer, stat)+1) setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) end end end end end end end end end end addEventHandler("onPlayerWasted",getRootElement(),PlayerKill) and ramdan kareem to all musulmans
  8. i have already but i have alarm like reallife alarms but i dont know how to make it
  9. i dont know how to make it please help me
  10. addCommandHandler ( "setlvl", function ( thePlayer, _, who, theLevel ) local theLevel = tonumber ( theLevel ) or 0 local playerWho = getPlayerFromName ( who ) if ( playerWho ) then exports.exp_system:setPlayerLevel ( playerWho, theLevel ) end end )
  11. yes i want just if player lock vehicle it play lock.mp3 sound when unlock play unlock.mp3 sound and if player hit the vehicle play alarm.mp3 sound
  12. try this addCommandHandler ( "setexp", function ( thePlayer, _, who, theExP ) local theExP = tonumber ( theExP ) or 0 local playerWho = getPlayerFromName ( who ) if ( playerWho ) then exports.exp_system:setPlayerEXP ( playerWho, theExP ) end end )
  13. No erros still not working
  14. function playLockingSound(vehicle) if vehicle then source = vehicle end local x,y,z = getElementPosition(source) local lockSound = playSound3D("files/lock.mp3", x, y, z) setSoundMaxDistance(lockSound, 50) attachElements(lockSound, source) beep(source) end addEvent("onClientVehicleLock", true) addEventHandler("onClientVehicleLock", root, playLockingSound) function playUnlockingSound() stopVehicleAlarm(source) local x,y,z = getElementPosition(source) local unlockSound = playSound3D("files/unlock.mp3", x, y, z) setSoundMaxDistance(unlockSound, 50) attachElements(unlockSound, source) beep(source) setTimer(beep, 200, 1, source) end addEvent("onClientVehicleUnlock", true) addEventHandler("onClientVehicleUnlock", root, playUnlockingSound) function beep(vehicle) if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) setTimer(setVehicleOverrideLights, 100, 1, vehicle, 1) else setVehicleOverrideLights(vehicle, 1) setTimer(setVehicleOverrideLights, 100, 1, vehicle, 2) end end
  15. can you fix it to me? i'm kinda lazy srry for that work ._.
  16. yes but thats all what i understand
  17. addEventHandler("onClientVehicleStartEnter", root, function(thePlayer, seat) if seat == 0 then if isVehicleLocked ( source ) then local x,y,z = getElementPosition(source) audio = playSound3D("lock.mp3", x,y,z,true) end end end ) function stopMySound() stopSound(audio) end addCommandHandler ( "stopalarm", stopMySound )
  18. Hello guys, i'm looking for a vehicle alarm system if player locked vehicle it will play sound lock.mp3 if vehicle unlocked play unlock.mp3 and if player hit you're it play alarm.mp3
  19. function="getPlayerLevel" type="server" /> function="setPlayerLevel" type="server" /> function="getPlayerExP" type="server" /> function="setPlayerExP" type="server" /> function="getLevelData" type="server" /> like that ?
  20. Sure Gonna try ^^..Thanks a lot too Thanks A lot!! A lot!! A lot!! but can you make a script can control the exp and level.. .. like i can set level for players and exp?..and THANKS again ^^ control ??
×
×
  • Create New...