Jump to content

BaseArea51


xeon17

Recommended Posts

Posted

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' 

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted
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) 

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Work now :D 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] 

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted (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 by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

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] 

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted
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 
) 

Please do not PM me with scripting related question nor support, use the forums instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...