BR

Comando

Por BrunooMaciell, 14 de ago. de 2020 em Scripts

3
1.5k
BrunooMaciellB
14 de agosto de 2020 às 11:54

Eu queria por 2 comandos pra so premium account pode usar.

 

Comando CORRER

 

function onSay(cid, words, param)
if exhaustion.get(cid, 501) then
doPlayerSendCancel(cid, 'Você precisa espera 10 segundos para usar novamente.')
return true
end 

if getPlayerStorageValue(cid, 32001) == 1 then
        doPlayerSendCancel(cid, "Você não pode usar bike e correr ao mesmo tempo")
		return false
		end
		
		if getPlayerStorageValue(cid, 17000) == 1 then
        doPlayerSendCancel(cid, "Você não pode usar bike e correr ao mesmo tempo")
		return false
		end
		
		if getPlayerStorageValue(cid, 17001) == 1 then
        doPlayerSendCancel(cid, "Você não pode usar bike e correr ao mesmo tempo")
		return false
		end


if isCreature(cid) then
doCreatureSay(cid, "correr", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 19000, 1)
doChangeSpeed(cid, 1 * 5000)
doSendMagicEffect(getPlayerPosition(cid), 1)
exhaustion.set(cid, 501, 10)
addEvent(function()
setPlayerStorageValue(cid, 19000, 0)
doRegainSpeed(cid)
end, 15000) -- Tempo que vai durar a talkaction
return true
end
end

Comando LUZ

local minutes = 15 -- Minutos
 
function onSay(cid, words, param)
if isPlayer(cid) then
doSetCreatureLight(cid, 50000, 2000, minutes*60*1000)
doSendAnimatedText(getCreaturePosition(cid), "Luz", math.random(1, 255))
end
return true
end

REP+++

PoccnnP
14 de agosto de 2020 às 12:34
Melhor resposta
function onSay(cid, words, param)
if(getPlayerPremiumDays(cid) <= 0)then return true,doPlayerSendCancel(cid, 'Need premium.')end
	
	if exhaustion.get(cid, 501) then
		doPlayerSendCancel(cid, 'Você precisa espera 10 segundos para usar novamente.')
	elseif getPlayerStorageValue(cid, 32001) == 1 or getPlayerStorageValue(cid, 17000) == 1 or getPlayerStorageValue(cid, 17001) == 1 then
		doPlayerSendCancel(cid, "Você não pode usar bike e correr ao mesmo tempo")
		return false
	elseif isCreature(cid) then
		doCreatureSay(cid, "correr", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, 19000, 1)
		doChangeSpeed(cid, 1 * 5000)
		doSendMagicEffect(getPlayerPosition(cid), 1)
		exhaustion.set(cid, 501, 10)
		addEvent(function()
			setPlayerStorageValue(cid, 19000, 0)
			doRegainSpeed(cid)
		end, 15000) -- Tempo que vai durar a talkaction
	end
	return true
end

 

local minutes = 15 -- Minutos

function onSay(cid, words, param)
if(getPlayerPremiumDays(cid) <= 0)then return true,doPlayerSendCancel(cid, 'Need premium.')end
	doSetCreatureLight(cid, 50000, 2000, minutes*60*1000)
	doSendAnimatedText(getCreaturePosition(cid), "Luz", math.random(1, 255))
	return true
end

 

BrunooMaciellB
14 de agosto de 2020 às 12:49
15 minutos atrás, Poccnn disse:
function onSay(cid, words, param)
if(getPlayerPremiumDays(cid) <= 0)then return true,doPlayerSendCancel(cid, 'Need premium.')end
	
	if exhaustion.get(cid, 501) then
		doPlayerSendCancel(cid, 'Você precisa espera 10 segundos para usar novamente.')
	elseif getPlayerStorageValue(cid, 32001) == 1 or getPlayerStorageValue(cid, 17000) == 1 or getPlayerStorageValue(cid, 17001) == 1 then
		doPlayerSendCancel(cid, "Você não pode usar bike e correr ao mesmo tempo")
		return false
	elseif isCreature(cid) then
		doCreatureSay(cid, "correr", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, 19000, 1)
		doChangeSpeed(cid, 1 * 5000)
		doSendMagicEffect(getPlayerPosition(cid), 1)
		exhaustion.set(cid, 501, 10)
		addEvent(function()
			setPlayerStorageValue(cid, 19000, 0)
			doRegainSpeed(cid)
		end, 15000) -- Tempo que vai durar a talkaction
	end
	return true
end

 

local minutes = 15 -- Minutos

function onSay(cid, words, param)
if(getPlayerPremiumDays(cid) <= 0)then return true,doPlayerSendCancel(cid, 'Need premium.')end
	doSetCreatureLight(cid, 50000, 2000, minutes*60*1000)
	doSendAnimatedText(getCreaturePosition(cid), "Luz", math.random(1, 255))
	return true
end

 

Foi vlw ^^