tanii
Empire-war.com
- Joined
- Jan 16, 2015
- Messages
- 383
- Solutions
- 1
- Reaction score
- 12
Hello Otlanders how i can do winner Player get Reward?
PHP:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7001 and item.itemid == 1945 then
player1pos = {x=32082, y=32221, z=9, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=32084, y=32221, z=9, stackpos=253}
player2 = getThingfromPos(player2pos)
if player1.itemid > 0 and player2.itemid > 0 then
arenalevel = 50
player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
if player1level >= arenalevel and player2level >= arenalevel then
for arenax = 74,89 do
for arenay = 72,78 do
arenapos = {x=arenax, y=arenay, z=8, stackpos=253}
arenacreature = getThingfromPos(arenapos)
if arenacreature.itemid > 0 then
doPlayerSendCancel(cid,"Wait for current duel to end.")
return 1
end
end
end
nplayer1pos = {x=32130, y=32178, z=7}
nplayer2pos = {x=32130, y=32178, z=7}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doPlayerSendTextMessage(player1.uid,18,"FIGHT!")
doPlayerSendTextMessage(player2.uid,18,"FIGHT!")
else
doPlayerSendCancel(cid,"Los dos luchadores deben ser level 50 para entrar a Arena.")
end
else
doPlayerSendCancel(cid,"Se nesesitan dos jugadores para entrar a Arena.")
end
else
return 0
end
return 1
end