xeon17 Posted December 29, 2013 Share Posted December 29, 2013 Script no work , i edited a little can someone help me. radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) createBlip(279.40317, 1831.25439, 7.72656,61) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) addCommandHandler("buyarea51", function(player) local gangName = exports.gang_system:getPlayerGang(player) if(isElementWithinMarker(thePlayer,marker2)then if gangName then local money = getPlayerMoney(player) if (money >= 1000000)then takePlayerMoney(player, 1000000) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea, color[1], color[2], color[2], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area 51 !", player, 0, 0, 0, true) else outputChatBox("#FFF000[bASE] You arent on the checkpoint !") end end end end) debug : [2013-12-29 21:39:56] SCRIPT ERROR: [XeonGames]Base\Area51.lua:6: ')' expected near 'then' [2013-12-29 21:39:56] ERROR: Loading script failed: [XeonGames]Base\Area51.lua:6: ')' expected near 'then' Link to comment
-.Paradox.- Posted December 29, 2013 Share Posted December 29, 2013 radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) createBlip(279.40317, 1831.25439, 7.72656,61) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) addCommandHandler("buyarea51", function(player) local gangName = exports.gang_system:getPlayerGang(player) if(isElementWithinMarker(thePlayer,marker2))then if gangName then local money = getPlayerMoney(player) if (money >= 1000000)then takePlayerMoney(player, 1000000) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea, color[1], color[2], color[2], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area 51 !", player, 0, 0, 0, true) else outputChatBox("#FFF000[bASE] You arent on the checkpoint !") end end end end) Link to comment
xeon17 Posted December 29, 2013 Author Share Posted December 29, 2013 Work now but i have now this bug [2013-12-29 22:31:37] WARNING: [XeonGames]Base\Area51.lua:6: Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got nil] [2013-12-29 22:32:07] WARNING: [XeonGames]Base\Area51.lua:6: Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got nil] Link to comment
-.Paradox.- Posted December 29, 2013 Share Posted December 29, 2013 (edited) Try this radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) createBlip(279.40317, 1831.25439, 7.72656,61) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) addCommandHandler("buyarea51", function () local gangName = exports.gang_system:getPlayerGang(source) if(isElementWithinMarker(source, marker2))and gangName and (getPlayerMoney (source) >= tonumber(1000000)) then takePlayerMoney (source, tonumber (1000000)) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea, color[1], color[2], color[2], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area 51 !", source, 0, 0, 0, true) else outputChatBox("#FFF000[bASE] You arent on the checkpoint !", source, 0, 0, 0, true) end end ) Edited December 29, 2013 by Guest Link to comment
xeon17 Posted December 29, 2013 Author Share Posted December 29, 2013 Yes now when im not on the checkpoint ''marker2'' i get chatbox [bASE] You arent on checkpoint but when i'm on checkpoint (marker2) still writing [bASE] You arent on checkpoint debug [2013-12-29 22:55:59] WARNING: [XeonGames]Base\Area51.lua:7: Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got nil] Link to comment
DNL291 Posted December 29, 2013 Share Posted December 29, 2013 radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) createBlip(279.40317, 1831.25439, 7.72656,61) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) addCommandHandler("buyarea51", function (source) local gangName = exports.gang_system:getPlayerGang(source) if (isElementWithinMarker(source, marker2)) and gangName and (getPlayerMoney(source) >= 1000000) then takePlayerMoney (source, 1000000) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea, color[1], color[2], color[3], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area 51 !", source, 0, 0, 0, true) else outputChatBox("#FFF000[bASE] You arent on the checkpoint !", source, 0, 0, 0, true) end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now