Jump to content

Buy Map Problem


anksel

Recommended Posts

Posted
function buyMap(thePlayer,mapName) 
    if mapIsAlreadySet == false then 
        if not (mapName == "") then 
            local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) 
            if playerCash >= mapCost then 
                savePlayerData(thePlayer,"cash",playerCash-mapCost) 
                triggerEvent("onExternalNextmapRequest",thePlayer,thePlayer,mapName) 
                outputChatBox("#0FC0FC#* #FFFFFFNextmap: "..getPlayerName(thePlayer).."#FFFFFF has bought a next map!",getRootElement(),255,255,255,true) 
                outputChatBox("#0FC0FC#* #FFFFFFNextmap: #ABCDEF"..mapName,getRootElement(),255,255,255,true) 
                mapIsAlreadySet = true 
                local oldmapbuys = loadPlayerData(thePlayer,"mapBuys") 
                savePlayerData(thePlayer,"mapBuys", oldmapbuys + 1) 
                CheckAchievement(thePlayer,13) 
                scoreboardRefresh(thePlayer) 
            else 
                outputChatBox("#0FC0FC#* #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) 
            end 
        else 
            outputChatBox("#0FC0FC#* #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) 
        end 
    else 
        outputChatBox("#0FC0FC#* #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) 
    end 
end 
  

:S

Guest Guest4401
Posted

This isn't your script and you, yourself don't know what's the error/problem?

Posted
This isn't your script and you, yourself don't know what's the error/problem?

If this isn't your script then we can not help you,

if this came from another scripter then ask them if you could modify there resource, maybe they could even help you with it.

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Posted

we not want help to guys, who stole the scripts,close please

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

Posted

We don't help people who steal other's work.

Topic locked.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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