scripterr Posted March 21, 2012 Share Posted March 21, 2012 Hello when player press 'H' It horns one time and until next map start player cant horn Help me to make the players can horn always. -- Horns function getPurchasedHorns(thePlayer) local airhorn = tonumber(loadPlayerData(thePlayer,"horn1")) local clown = tonumber(loadPlayerData(thePlayer,"horn2")) local train = tonumber(loadPlayerData(thePlayer,"horn3")) local ship = tonumber(loadPlayerData(thePlayer,"horn4")) local submarine = tonumber(loadPlayerData(thePlayer,"horn5")) local military = tonumber(loadPlayerData(thePlayer,"horn6")) local whoopie = tonumber(loadPlayerData(thePlayer,"horn7")) callClientFunction(thePlayer,"updateHorns",thePlayer,airhorn,clown,train,ship,submarine,military,whoopie) end function purchaseHorn(thePlayer,horn,hornName) local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) local playerLevel = tonumber(loadPlayerData(thePlayer,"level")) local checkOwnership = tonumber(loadPlayerData(thePlayer,"horn"..horn)) if checkOwnership == 0 then if playerLevel >= hornLevel then if playerCash >= hornPrice[horn] then savePlayerData(thePlayer,"cash",playerCash-hornPrice[horn]) savePlayerData(thePlayer,tostring("horn"..horn),1) getPurchasedHorns(thePlayer) scoreboardRefresh(thePlayer) achievement39(thePlayer) outputChatBox("#0095FF* #FFFFFFYou have purchased the #ABCDEF"..hornName.."#FFFFFF horn for #ABCDEF$"..hornPrice[horn].."#FFFFFF!",thePlayer,255,255,255,true) else outputChatBox("#0095FF* #FFFFFFERROR! You don't have enough money!",thePlayer,255,255,255,true) end else outputChatBox("#0095FF* #FFFFFFERROR! You need to be level #ABCDEF"..hornLevel.."#FFFFFF or higher to purchase new horns!",thePlayer,255,255,255,true) end else outputChatBox("#0095FF* #FFFFFFERROR! You already own this horn!",thePlayer,255,255,255,true) end end function checkForPurchasedHorn(thePlayer,horn) local hornStatus = tonumber(loadPlayerData(thePlayer,"horn"..horn)) if hornStatus == 1 then callClientFunction(thePlayer,"setHorn",horn) else outputChatBox("#0095FF* #FFFFFFERROR! You do not own this horn!",thePlayer,255,255,255,true) end end function getLastSetHorn(thePlayer) local horn = tonumber(loadPlayerData(thePlayer,"lastSetHorn")) callClientFunction(thePlayer,"setLastUsedHorn",horn) end function setLastSetHorn(thePlayer,horn) savePlayerData(thePlayer,"lastSetHorn",horn) end function toggleHornControl() for _,player in ipairs(getElementsByType("player")) do if loadPlayerData(player,"lastSetHorn") == 0 then setTimer(toggleControl,2,1,player,"horn",ture) else setTimer(toggleControl,2,1,player,"horn",true) end end end addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(),toggleHornControl) function toggleControlOnReady() if loadPlayerData(source,"lastSetHorn") == 0 then toggleControl(source,"horn",true) else toggleControl(source,"horn",true) end end addEventHandler("onNotifyPlayerReady",getRootElement(),toggleControlOnReady) function playHornForAllClients(horningPlayer,hornSoundPath,cSetHornSound) -- This function passes on the horn to all players. triggerClientEvent(getRootElement(),"onRecieveHorn",horningPlayer,horningPlayer,hornSoundPath,cSetHornSound) end Link to comment
Castillo Posted March 21, 2012 Share Posted March 21, 2012 Do you have permission to use this script? because you didn't script it. Link to comment
scripterr Posted March 21, 2012 Author Share Posted March 21, 2012 Do you have permission to use this script? because you didn't script it. Not me. But doest care. Just help please Link to comment
Castillo Posted March 21, 2012 Share Posted March 21, 2012 We do care, if you're asking help with a script you don't own and you don't have permission to use, it's like we're helping you to steal it. Link to comment
scripterr Posted March 21, 2012 Author Share Posted March 21, 2012 We do care, if you're asking help with a script you don't own and you don't have permission to use, it's like we're helping you to steal it. Steal ? : DD I buyed it Link to comment
Absence2 Posted March 21, 2012 Share Posted March 21, 2012 I don't like this scripterr guy very much, he keeps coming here with stolen scripts ! Link to comment
scripterr Posted March 21, 2012 Author Share Posted March 21, 2012 I don't like this scripterr guy very much, he keeps coming here with stolen scripts ! I dont care your opinion. And stop posting for better rank. Link to comment
scripterr Posted March 21, 2012 Author Share Posted March 21, 2012 We do care, if you're asking help with a script you don't own and you don't have permission to use, it's like we're helping you to steal it. And SolidSnake14 It horns system i buyed it from my firend. Link to comment
Castillo Posted March 21, 2012 Share Posted March 21, 2012 You said you didn't had permission, I guess if you buy it, you have permission. I really doubt you've bought it. Link to comment
-ffs-Sniper Posted March 21, 2012 Share Posted March 21, 2012 This script is missing a client side ("triggerClientEvent") so I highly doubt he has the persmission to use that script until he proves he is allowed to. Somehow that script reminds me of some server, don't know which exactly. Link to comment
drk Posted March 21, 2012 Share Posted March 21, 2012 Really. This is a stolen script. All scripts who people say "buyed from my friend" it's: STOLEN. And we don't help with stolen scripts. Link to comment
Castillo Posted March 21, 2012 Share Posted March 21, 2012 We don't help with stolen scripts. Topic locked. Link to comment
Recommended Posts