-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Kenix
-
Well, I say to the map file all well and function spawn player I have not worked 6 line does not work.how to fix it ?
-
I make a new gamemode but the spawn is not working please help function startMap( startedMap ) mapRoot = source local mapRoot = getResourceRootElement( startedMap ) local xi, yi, zi = 0, 0, 0 local spawns = table.merge(getElementsByType("spawnpoint",mapRoot),getElementsByType("spawnpoint2",mapRoot),getElementsByType("spawnpoint1",mapRoot)) for i,spawnpoint in ipairs(spawns) do xi = xi + getElementData( spawnpoint, "posX" ) yi = yi + getElementData( spawnpoint, "posY" ) zi = zi + getElementData( spawnpoint, "posZ" ) end xi = xi/spawns yi = yi/spawns zi = zi/spawns end addEventHandler("onGamemodeMapStart", getRootElement(), startMap)
-
There is a problem when the player dies a sound all the same plays = (
-
Only there is a problem this sound always plays as to make that it didn't play after death?
-
I have made a script that when at the player of 90 hp plays a sound of knock of heart. But the script doesn't work help please! local HP = getLocalPlayer() heartsoundPlayer = function() local localHealth = getElementHealth(HP) if localHealth < 90 then playSound("heart.mp3", false) setSoundVolume(sound, 2.5) -- set the sound volume to 50% end end addEventHandler("onClientPlayerDamage", HP, heartsoundPlayer)
-
---/// x y z position playSound3D("namemusic.mp3",x, y, z, true) add line in meta
-
Guys it has almost turned out a script almost works when you buy skill money are spent, doesn't work only setpedstat. addEvent ("view", true) function showGui (hitPlayer, matchingDimension) triggerClientEvent ("view", hitPlayer) end addCommandHandler("skill",showGui) function skillButton (id, cost) if (id == "0") then ----//error if setPedStat(player, 0, 40) then end skillBuyPlayer (250,source,69) elseif (id == "1") then ----//error if setPedStat(player, 1, 240) then end skillBuyPlayer (1000,source,69) elseif (id == "2") then ----//error if setPedStat(player, 1, 240) then end skillBuyPlayer (3000,source,69) elseif (id == "3") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (2000,source,71) elseif (id == "4") then ----//error if setPedStat(player, id, 500) then end skillBuyPlayer (4000,source,71) elseif (id == "5") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (6000,source,71) elseif (id == "6") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (2500,source,72) elseif (id == "7") then ----//error if setPedStat(player, id, 450) then end skillBuyPlayer (5500,source,72) elseif (id == "8") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (7500,source,72) elseif (id == "9") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (4000,source,73) elseif (id == "10") then ----//error if setPedStat(player, id, 450) then end skillBuyPlayer (6000,source,73) elseif (id == "11") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (9000,source,73) elseif (id == "12") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (8000,source,74) elseif (id == "13") then ----//error if setPedStat(player, id, 450) then end skillBuyPlayer (9000,source,74) elseif (id == "14") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (12000,source,74) elseif (id == "15") then ----//error if setPedStat(player, id, 50) then end skillBuyPlayer (20000,source,75) elseif (id == "16") then ----//error if setPedStat(player, id, 450) then end skillBuyPlayer (16000,source,75) elseif (id == "17") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (21000,source,75) elseif (id == "18") then ----//error if setPedStat(player, id, 250) then end skillBuyPlayer (12000,source,76) elseif (id == "19") then ----//error if setPedStat(player, id, 500) then end skillBuyPlayer (18000,source,76) elseif (id == "20") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (23000,source,76) elseif (id == "21") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (15000,source,77) elseif (id == "22") then ----//error if setPedStat(player, id, 500) then end skillBuyPlayer (22000,source,77) elseif (id == "23") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (27000,source,77) elseif (id == "24") then ----//error if setPedStat(player, id, 200) then end skillBuyPlayer (18000,source,78) elseif (id == "25") then ----//error if setPedStat(player, id, 500) then end skillBuyPlayer (25000,source,78) elseif (id == "26") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (30000,source,78) elseif (id == "27") then ----//error if setPedStat(player, id, 300) then end skillBuyPlayer (20000,source,79) elseif (id == "28") then ----//error if setPedStat(player, id, 500) then end skillBuyPlayer (32000,source,79) elseif (id == "29") then ----//error if setPedStat(player, id, 999) then end skillBuyPlayer (42000,source,79) end end addEvent ("skillBuy", true) addEventHandler ("skillBuy", getRootElement(),skillButton) function skillBuyPlayer (cash,player,id) if (getPlayerMoney (player) >= cash) then takePlayerMoney (player,cash) setPedStat(player, id, 0) else outputChatBox ("вы слишком бедны!", player, 255,0,0) end end
-
Matter is not in it where there is (if elseif end ) here in what a business And this error arises when use skill addEvent ("view", true) function showGui (hitPlayer, matchingDimension) triggerClientEvent ("view", hitPlayer) end addCommandHandler("skill",showGui) function skillButton (id, cost) if (id == "0") then ----//error if ( stat > 40 ) then ----//error end skillBuyPlayer (250,source,69) elseif (id == "1") then ----//error if ( stat > 240 ) then ----//error end skillBuyPlayer (1000,source,69) elseif (id == "2") then ----//error if ( stat > 999 ) then end skillBuyPlayer (3000,source,69) elseif (id == "3") then ----//error if ( stat > 200 ) then end skillBuyPlayer (2000,source,71) elseif (id == "4") then ----//error if ( stat > 500 ) then end skillBuyPlayer (4000,source,71) elseif (id == "5") then ----//error if ( stat > 999 ) then end skillBuyPlayer (6000,source,71) elseif (id == "6") then ----//error if ( stat > 200 ) then end skillBuyPlayer (2500,source,72) elseif (id == "7") then ----//error if ( stat > 450 ) then end skillBuyPlayer (5500,source,72) elseif (id == "8") then ----//error if ( stat > 999 ) then end skillBuyPlayer (7500,source,72) elseif (id == "9") then ----//error if ( stat > 200 ) then end skillBuyPlayer (4000,source,73) elseif (id == "10") then ----//error if ( stat > 450 ) then end skillBuyPlayer (6000,source,73) elseif (id == "11") then ----//error if ( stat > 999 ) then end skillBuyPlayer (9000,source,73) elseif (id == "12") then ----//error if ( stat > 200 ) then end skillBuyPlayer (8000,source,74) elseif (id == "13") then ----//error if ( stat > 450 ) then end skillBuyPlayer (9000,source,74) elseif (id == "14") then ----//error if ( stat > 999 ) then end skillBuyPlayer (12000,source,74) elseif (id == "15") then ----//error if ( stat > 50 ) then end skillBuyPlayer (20000,source,75) elseif (id == "16") then ----//error if ( stat > 450 ) then end skillBuyPlayer (16000,source,75) elseif (id == "17") then ----//error if ( stat > 999 ) then end skillBuyPlayer (21000,source,75) elseif (id == "18") then ----//error if ( stat > 250 ) then end skillBuyPlayer (12000,source,76) elseif (id == "19") then ----//error if ( stat > 500 ) then end skillBuyPlayer (18000,source,76) elseif (id == "20") then ----//error if ( stat > 999 ) then end skillBuyPlayer (23000,source,76) elseif (id == "21") then ----//error if ( stat > 200 ) then end skillBuyPlayer (15000,source,77) elseif (id == "22") then ----//error if ( stat > 500 ) then end skillBuyPlayer (22000,source,77) elseif (id == "23") then ----//error if ( stat > 999 ) then end skillBuyPlayer (27000,source,77) elseif (id == "24") then ----//error if ( stat > 200 ) then ; end skillBuyPlayer (18000,source,78) elseif (id == "25") then ----//error if ( stat > 500 ) then end skillBuyPlayer (25000,source,78) elseif (id == "26") then ----//error if ( stat > 999 ) then end skillBuyPlayer (30000,source,78) elseif (id == "27") then ----//error if ( stat > 300 ) then end skillBuyPlayer (20000,source,79) elseif (id == "28") then ----//error if ( stat > 500 ) then end skillBuyPlayer (32000,source,79) elseif (id == "29") then ----//error if ( stat > 999 ) then end skillBuyPlayer (42000,source,79) end end addEvent ("skillBuy", true) addEventHandler ("skillBuy", getRootElement(),skillButton) function skillBuyPlayer (cash,player,id) if (getPlayerMoney (player) >= cash) then takePlayerMoney (player,cash) setPedStat(player, id, 0) else outputChatBox ("вы слишком бедны!", player, 255,0,0) end end fix my script please
-
varez script not work addEvent ("view", true) function showGui (hitPlayer, matchingDimension) triggerClientEvent ("view", hitPlayer) end addCommandHandler("skill",showGui) function skillButton (id, cost) if ( stat > 40 ) then ----//error elseif (id == "0") then ----//error end skillBuyPlayer (250,source,69) if ( stat > 240 ) then ----//error elseif (id == "1") then ----//error end skillBuyPlayer (1000,source,69) if ( stat > 3 ) then elseif (id == "2") then ----//error if ( stat > 999 ) then end skillBuyPlayer (3000,source,69) elseif (id == "3") then ----//error if ( stat > 200 ) then end skillBuyPlayer (2000,source,71) elseif (id == "4") then ----//error if ( stat > 500 ) then end skillBuyPlayer (4000,source,71) elseif (id == "5") then ----//error if ( stat > 999 ) then end skillBuyPlayer (6000,source,71) elseif (id == "6") then ----//error if ( stat > 200 ) then end skillBuyPlayer (2500,source,72) elseif (id == "7") then ----//error if ( stat > 450 ) then end skillBuyPlayer (5500,source,72) elseif (id == "8") then ----//error if ( stat > 999 ) then end skillBuyPlayer (7500,source,72) elseif (id == "9") then ----//error if ( stat > 200 ) then end skillBuyPlayer (4000,source,73) elseif (id == "10") then ----//error if ( stat > 450 ) then end skillBuyPlayer (6000,source,73) elseif (id == "11") then ----//error if ( stat > 999 ) then end skillBuyPlayer (9000,source,73) elseif (id == "12") then ----//error if ( stat > 200 ) then end skillBuyPlayer (8000,source,74) elseif (id == "13") then ----//error if ( stat > 450 ) then end skillBuyPlayer (9000,source,74) elseif (id == "14") then ----//error if ( stat > 999 ) then end skillBuyPlayer (12000,source,74) elseif (id == "15") then ----//error if ( stat > 50 ) then end skillBuyPlayer (20000,source,75) elseif (id == "16") then ----//error if ( stat > 450 ) then end skillBuyPlayer (16000,source,75) elseif (id == "17") then ----//error if ( stat > 999 ) then end skillBuyPlayer (21000,source,75) elseif (id == "18") then ----//error if ( stat > 250 ) then end skillBuyPlayer (12000,source,76) elseif (id == "19") then ----//error if ( stat > 500 ) then end skillBuyPlayer (18000,source,76) elseif (id == "20") then ----//error if ( stat > 999 ) then end skillBuyPlayer (23000,source,76) elseif (id == "21") then ----//error if ( stat > 200 ) then end skillBuyPlayer (15000,source,77) elseif (id == "22") then ----//error if ( stat > 500 ) then end skillBuyPlayer (22000,source,77) elseif (id == "23") then ----//error if ( stat > 999 ) then end skillBuyPlayer (27000,source,77) elseif (id == "24") then ----//error if ( stat > 200 ) then end skillBuyPlayer (18000,source,78) elseif (id == "25") then ----//error if ( stat > 500 ) then end skillBuyPlayer (25000,source,78) elseif (id == "26") then ----//error if ( stat > 999 ) then end skillBuyPlayer (30000,source,78) elseif (id == "27") then ----//error if ( stat > 300 ) then end skillBuyPlayer (20000,source,79) elseif (id == "28") then ----//error if ( stat > 500 ) then end skillBuyPlayer (32000,source,79) elseif (id == "29") then ----//error if ( stat > 999 ) then end skillBuyPlayer (42000,source,79) end end addEvent ("skillBuy", true) addEventHandler ("skillBuy", getRootElement(),skillButton) function skillBuyPlayer (cash,player,id) if (getPlayerMoney (player) >= cash) then takePlayerMoney (player,cash) setPedStat(player, id, 0) else outputChatBox ("вы слишком бедны!", player, 255,0,0) end end
-
I have made new skill but an error Error when I use skill To one weapon on 3 skills addEvent ("view", true) function showGui (hitPlayer, matchingDimension) triggerClientEvent ("view", hitPlayer) end addCommandHandler("skill",showGui) function skillButton (id, cost) if (id == "0") then skillBuyPlayer (250,source,69) if ( stat > 40 ) then ----//error elseif (id == "1") then ----//error skillBuyPlayer (1000,source,69) if ( stat > 400 ) then elseif (id == "2") then ----//error if ( stat > 999 ) then skillBuyPlayer (3000,source,69) elseif (id == "3") then ----//error if ( stat > 200 ) then skillBuyPlayer (2000,source,71) elseif (id == "4") then ----//error if ( stat > 500 ) then skillBuyPlayer (4000,source,71) elseif (id == "5") then ----//error if ( stat > 999 ) then skillBuyPlayer (6000,source,71) elseif (id == "6") then ----//error if ( stat > 200 ) then skillBuyPlayer (2500,source,72) elseif (id == "7") then ----//error if ( stat > 450 ) then skillBuyPlayer (5500,source,72) elseif (id == "8") then ----//error if ( stat > 999 ) then skillBuyPlayer (7500,source,72) elseif (id == "9") then ----//error if ( stat > 200 ) then skillBuyPlayer (4000,source,73) elseif (id == "10") then ----//error if ( stat > 450 ) then skillBuyPlayer (6000,source,73) elseif (id == "11") then ----//error if ( stat > 999 ) then skillBuyPlayer (9000,source,73) elseif (id == "12") then ----//error if ( stat > 200 ) then skillBuyPlayer (8000,source,74) elseif (id == "13") then ----//error if ( stat > 450 ) then skillBuyPlayer (9000,source,74) elseif (id == "14") then ----//error if ( stat > 999 ) then skillBuyPlayer (12000,source,74) elseif (id == "15") then ----//error if ( stat > 50 ) then skillBuyPlayer (20000,source,75) elseif (id == "16") then ----//error if ( stat > 450 ) then skillBuyPlayer (16000,source,75) elseif (id == "17") then ----//error if ( stat > 999 ) then skillBuyPlayer (21000,source,75) elseif (id == "18") then ----//error if ( stat > 250 ) then skillBuyPlayer (12000,source,76) elseif (id == "19") then ----//error if ( stat > 500 ) then skillBuyPlayer (18000,source,76) elseif (id == "20") then ----//error if ( stat > 999 ) then skillBuyPlayer (23000,source,76) elseif (id == "21") then ----//error if ( stat > 200 ) then skillBuyPlayer (15000,source,77) elseif (id == "22") then ----//error if ( stat > 500 ) then skillBuyPlayer (22000,source,77) elseif (id == "23") then ----//error if ( stat > 999 ) then skillBuyPlayer (27000,source,77) elseif (id == "24") then ----//error if ( stat > 200 ) then skillBuyPlayer (18000,source,78) elseif (id == "25") then ----//error if ( stat > 500 ) then skillBuyPlayer (25000,source,78) elseif (id == "26") then ----//error if ( stat > 999 ) then skillBuyPlayer (30000,source,78) elseif (id == "27") then ----//error if ( stat > 300 ) then skillBuyPlayer (20000,source,79) elseif (id == "28") then ----//error if ( stat > 500 ) then skillBuyPlayer (32000,source,79) elseif (id == "29") then ----//error if ( stat > 999 ) then skillBuyPlayer (42000,source,79) end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end addEvent ("skillBuy", true) addEventHandler ("skillBuy", getRootElement(),skillButton) function skillBuyPlayer (cash,player,id) if (getPlayerMoney (player) >= cash) then takePlayerMoney (player,cash) setPedStat(player, id, 0) else outputChatBox ("вы слишком бедны!", player, 255,0,0) end end
-
Enormous thanks you have very much helped
-
Enormous thanks you have very much helped I have found 2 bugs I have corrected a script it works =)
-
function playerLogin () if not (isGuestAccount (getPlayerAccount (source))) then local statID0 = getAccountData (theCurrentAccount, "funmodev2-statID0") local statID1 = getAccountData (theCurrentAccount, "funmodev2-statID1") local statID2 = getAccountData (theCurrentAccount, "funmodev2-statID2") local statID3 = getAccountData (theCurrentAccount, "funmodev2-statID3") local statID4 = getAccountData (theCurrentAccount, "funmodev2-statID4") local statID5 = getAccountData (theCurrentAccount, "funmodev2-statID5") local statID6 = getAccountData (theCurrentAccount, "funmodev2-statID6") local statID7 = getAccountData (theCurrentAccount, "funmodev2-statID7") local statID8 = getAccountData (theCurrentAccount, "funmodev2-statID8") local statID9 = getAccountData (theCurrentAccount, "funmodev2-statID9") local statID10 = getAccountData (theCurrentAccount, "funmodev2-statID10") local statID11 = getAccountData (theCurrentAccount, "funmodev2-statID11") local statID12 = getAccountData (theCurrentAccount, "funmodev2-statID12") end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit () if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-statID0", GetPlayerStat (source, 0)) setAccountData (account, "funmodev2-statID1", GetPlayerStat (source, 1)) setAccountData (account, "funmodev2-statID2", GetPlayerStat (source, 2)) setAccountData (account, "funmodev2-statID3", GetPlayerStat (source, 3)) setAccountData (account, "funmodev2-statID4", GetPlayerStat (source, 4)) setAccountData (account, "funmodev2-statID5", GetPlayerStat (source, 5)) setAccountData (account, "funmodev2-statID6", GetPlayerStat (source, 6)) setAccountData (account, "funmodev2-statID7", GetPlayerStat (source, 7)) setAccountData (account, "funmodev2-statID8", GetPlayerStat (source,) setAccountData (account, "funmodev2-statID9", GetPlayerStat (source, 9)) setAccountData (account, "funmodev2-statID10", GetPlayerStat (source, 10)) setAccountData (account, "funmodev2-statID11", GetPlayerStat (source, 11)) setAccountData (account, "funmodev2-statID12", GetPlayerStat (source, 12)) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) bad argument 3-15 lines =(
-
I want to make a script to keep waepon skill the player but it doesn't work looked on wiki hasn't helped. function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local stat = getAccountData (theCurrentAccount, "funmodev2-stat") end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "funmodev2-stat", tostring (GetPlayerStat (source))) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
-
Error in line 51 You should make function with loll
-
I can be mistaken but errors aren't present function startclient ( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then local sound = playSound("files/warp.mp3") setSkyGradient( 50 , 255 , 255 , 65 , 100 , 25 ) Marker1 = createMarker ( 4183.0122070313, -2877.7978515625, 1067.9123535156, "arrow", 5, 0, 2, 255, 255) local sound = playSound("files/warp.mp3") addEventHandler( "onMarkerHit", Marker1) end function warp (player) if source == Marker1 then if isPedInVehicle(player) then local vehicle=getPedOccupiedVehicle(player) setElementPosition (vehicle , 4154.0571289063, -2392.6955566406, 1610.1810302734 ) setTimer( setVehicleFrozen, 1000, 1, vehicle, false ) end end end end addEventHandler( "onClientResourceStart", resourceRoot, startclient ) addEventHandler( "onClientMarkerHit", getRootElement(), warp )