Postado Setembro 12, 2012 12 anos function onStepIn(cid, item, position, fromPosition) local config = { redTeam = 3, blueTeam = 4, depot = {x=517,y=840,z=7,stackpos=1}, rewardRoom = {x=636,y=662,z=7,stackpos=1} } local Team = getPlayerStorageValue(cid,1000) local redStorage = getGlobalStorageValue(2001) local blueStorage = getGlobalStorageValue(2002) local currentWins = getPlayerStorageValue(cid,65533) local currentPlays = getPlayerStorageValue(cid,65534) local CHANNEL_BLUE, CHANNEL_RED = 12, 11 --If Red Team Wins if redStorage < blueStorage or getGlobalStorageValue(2000) == 1 then if Team == config.redTeam then if currentWins < 1 then setPlayerStorageValue(cid,65533,1) else setPlayerStorageValue(cid,65533,currentWins+1) end if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid,config.rewardRoom,false) doPlayerCloseChannel(cid, CHANNEL_RED) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 4) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, your team won the event!") else if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doTeleportThing(cid,config.depot,false) doPlayerCloseChannel(cid, CHANNEL_BLUE) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 4) end end --If Blue Team Wins if redStorage > blueStorage or getGlobalStorageValue(2000) == 2 then if Team == config.blueTeam then if currentWins < 1 then setPlayerStorageValue(cid,65533,1) else setPlayerStorageValue(cid,65533,currentWins+1) end if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid,config.rewardRoom,false) doPlayerCloseChannel(cid, CHANNEL_BLUE) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 4) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, your team won the event!") else if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doTeleportThing(cid,config.depot,false) doPlayerCloseChannel(cid, CHANNEL_RED) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 4) end end return true end Queria Por Pra Acabar Em 8 !! Editado Setembro 12, 2012 12 anos por raell5 (veja o histórico de edições)
Postado Setembro 12, 2012 12 anos function onStepIn(cid, item, position, fromPosition) local config = { redTeam = 3, blueTeam = 4, depot = {x=517,y=840,z=7,stackpos=1}, rewardRoom = {x=636,y=662,z=7,stackpos=1} } local Team = getPlayerStorageValue(cid,1000) local redStorage = getGlobalStorageValue(2001) local blueStorage = getGlobalStorageValue(2002) local currentWins = getPlayerStorageValue(cid,65533) local currentPlays = getPlayerStorageValue(cid,65534) local CHANNEL_BLUE, CHANNEL_RED = 12, 11 --If Red Team Wins if redStorage < blueStorage or getGlobalStorageValue(2000) == 1 then if Team == config.redTeam then if currentWins < 1 then setPlayerStorageValue(cid,65533,1) else setPlayerStorageValue(cid,65533,currentWins+1) end if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid,config.rewardRoom,false) doPlayerCloseChannel(cid, CHANNEL_RED) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 8) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, your team won the event!") else if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doTeleportThing(cid,config.depot,false) doPlayerCloseChannel(cid, CHANNEL_BLUE) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 8) end end --If Blue Team Wins if redStorage > blueStorage or getGlobalStorageValue(2000) == 2 then if Team == config.blueTeam then if currentWins < 1 then setPlayerStorageValue(cid,65533,1) else setPlayerStorageValue(cid,65533,currentWins+1) end if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid,config.rewardRoom,false) doPlayerCloseChannel(cid, CHANNEL_BLUE) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 8) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, your team won the event!") else if currentPlays < 1 then setPlayerStorageValue(cid,65534,1) else setPlayerStorageValue(cid,65534,currentPlays+1) end doTeleportThing(cid,config.depot,false) doPlayerCloseChannel(cid, CHANNEL_RED) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 1000, 0) setPlayerStorageValue(cid, 2000, 0) setGlobalStorageValue(2000, 8) end end return true end Tenta usar esse ai amigo.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.