Ir para conteúdo
  • Cadastre-se

Posts Recomendados

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 por raell5 (veja o histórico de edições)
13978461.png
Link para o post
Compartilhar em outros sites

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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo