Ir para conteúdo

Não Consigo Usar Este Script


Bubbleman23

Posts Recomendados

Pessoal não consigo usar isso ai pode ser da tag mas me fala ai se faz favor ;D

 

 

function getTime(s)

local n = math.floor(s / 60)

s = s - (60 * n)

return n, s

end

 

function target (cid, position, counter, min, max, damagetype)

local thing = getThingfromPos(position)

if (counter == 2) then

if isCreature(thing.uid) == FALSE then

doTeleportThing(thing.uid, getCreaturePosition(cid))

end

return true

end

doAreaCombatHealth(0, damagetype, position, 0, min, max, 0)

counter = counter + 1

addEvent(target, 200, cid, position, counter, min, damagetype)

end

local s = 9393

local items = {

[2429] = { --AWP

balaid = 2545,

level = 12,

skillup = 2,

mindamage = -47,

maxdamage = -52,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10001,

time = 2

},

[2428] = { --G3/SG-1

balaid = 2544,

level = 9,

skillup = 3,

mindamage = -38,

maxdamage = -43,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10002,

time = 1

},

[2431] = { --colt

balaid = 2544,

level = 10,

skillup = 3,

mindamage = -43,

maxdamage = -48,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10003,

time = 0.5

},

[2425] = { --ak-47

balaid = 2544,

level = 10,

skillup = 3,

mindamage = -41,

maxdamage = -46,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10004,

time = 1

},

[2432] = {

balaid = 2545,

level = 8,

skillup = 1,

mindamage = -37,

maxdamage = -42,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10005,

time = 3

},

[2413] = {

balaid = 2544,

level = 4,

skillup = 3,

mindamage = -17,

maxdamage = -22,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10006,

time = 1

},

[2411] = {

balaid = 2544,

level = 100,

skillup = 5,

mindamage = -27,

maxdamage = -32,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10007,

time = 2

},

[2380] = {

balaid = 2544,

level = 100,

skillup = 5,

mindamage = -23,

maxdamage = -28,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10008,

time = 1

},

[2427] = {

balaid = 2545,

level = 4,

skillup = 2,

mindamage = -22,

maxdamage = -27,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10009,

time = 5

},

[2383] = {

balaid = 2544,

level = 1,

skillup = 1,

mindamage = -5,

maxdamage = -10,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10010,

time = 2

},

[2395] = {

balaid = 2545,

level = 3,

skillup = 2,

mindamage = -14,

maxdamage = -19,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10011,

time = 3

},

[2397] = {

balaid = 2544,

level = 4,

skillup = 1,

mindamage = -20,

maxdamage = -25,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10012,

time = 2

},

[2387] = {

balaid = 2544,

level = 5,

skillup = 1,

mindamage = -20,

maxdamage = -25,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10013,

time = 2

},

[2398] = {

balaid = 2544,

level = 6,

skillup = 1,

mindamage = -20,

maxdamage = -28,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10014,

time = 3

},

[2391] = {

balaid = 2544,

level = 3,

skillup = 1,

mindamage = -11,

maxdamage = -16,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10015,

time = 2

},

[2400] = {

balaid = 2544,

level = 3,

skillup = 3,

mindamage = -15,

maxdamage = -20,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10016,

time = 1

},

[2424] = {

balaid = 2544,

level = 10,

skillup = 3,

mindamage = -15,

maxdamage = -20,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10017,

time = 1

},

[2388] = {

balaid = 2544,

level = 2,

skillup = 1,

mindamage = -9,

maxdamage = -14,

damagetype = COMBAT_PHYSICALDAMAGE,

storagetime = 10018,

time = 2

}

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

for i,b in pairs(dj.online) do

if b.cid == cid then

addEvent(function(b) b:send('EF=disparo.wav\n') end,500,b[1])

end

end

local guns = items[item.itemid]

if guns then

if cid == itemEx.uid then

return doPlayerSendCancel(cid, "You cannot shoot on yourself.")

end

if getPlayerLevel(cid) < guns.level then

return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You need level "..guns.level.." or higher.")

end

local time = guns.time

if os.time()-getPlayerStorageValue(cid, guns.storagetime)+1 <= time then

minutes,seconds = getTime(time-(os.time()-getPlayerStorageValue(cid, guns.storagetime)))

return doPlayerSendTextMessage(cid, 27, "Wait "..seconds.." seconds.")

end

if getPlayerItemCount(cid,guns.balaid) < 1 then

return doPlayerSendCancel(cid, "You don't have amunation.")

end

if not isInArray({getPlayerSlotItem(cid, 5).uid, getPlayerSlotItem(cid, 6).uid}, item.uid) then

return doPlayerSendCancel(cid, "Put you gun in your hand.")

end

if (getPlayerSlotItem(cid, 10).itemid == guns.balaid) then

doRemoveItem(getPlayerSlotItem(cid,10).uid, 1)

setPlayerStorageValue(cid, 4820, 1)

doSendDistanceShoot(getCreaturePosition(cid), toPosition, 40)

doPlayerAddSkillTry(cid, guns.skillup, 1)

addEvent(target, 300, cid, toPosition, 1, guns.mindamage, guns.maxdamage, guns.damagetype)

setPlayerStorageValue(cid, s, 1)

setPlayerStorageValue(cid, guns.storagetime, os.time())

setPlayerStorageValue(cid, s, -1)

setPlayerStorageValue(cid, 4820, -1)

else

doPlayerSendCancel(cid, "Put te munition in you slot.")

end

 

end

return true

end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...