Ceejzor
Murica Born N Raised!
IS there anyone who could make a script for example I could say !get gsp or !get uhp and it gives me 50 but they cannot do these talkactions until they are unpzed.
<talkaction words="!get" event="script" value="get.lua"/>
local t = {
['gsp'] = 8472,
['uhp'] = 8473
}
function onSay(cid, words, param, channel)
local k = t[param:lower()]
if k then
if not isPlayerPzLocked(cid) then
doPlayerAddItem(cid, k, 50)
else
doPlayerSendCancel(cid, 'You cannot use this command while PZLocked.')
end
else
doPlayerSendCancel(cid, 'Invaid param.')
end
return true
end
Sorry not so smart at lua and stuff but how would I add a price in there?
and how would I go about adding exhaust?
local es,s = 120,12354 -- exhaust in seconds, storage value
function onSay(cid,words,param)
if exhaustion.check(cid,s) then
return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false
end
dostuff
return true
end
Don't be lazy just copy it off other script >.>
REP+Code:local es,s = 120,12354 -- exhaust in seconds, storage value function onSay(cid,words,param) if exhaustion.check(cid,s) then return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false end dostuff return true end
![]()
local es,s = 120,12354 -- exhaust in seconds, storage value
function onSay(cid,words,param)
if exhaustion.check(cid,s) then
return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false
end
if k then
if not isPlayerPzLocked(cid) then
doPlayerAddItem(cid, k, 50)
else
doPlayerSendCancel(cid, 'You cannot use this command while PZLocked.')
end
else
doPlayerSendCancel(cid, 'Invaid param.')
end
return true
end