• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction Help in reworking script

Chaotic_Zal

New Member
Joined
Jun 17, 2017
Messages
17
Reaction score
1
Hi somebody could rewrite the code so that the player with PZ could not teleport. THX I <3 u all.

Code:
function onSay(cid, words, param)

if(param == '') then
exit = {x=1000, y=1000, z=7, stackpos=253}
doTeleportThing(cid,exit)
broadcastMessageEx(22,'Jestes w temple.Noobku')
doPlayerSendTextMessage(cid,19,"Tekst .")   
return true
end

return 1
end
 
Depends on what dist you use but try

Lua:
function onSay(cid, words, param)

if(param == '') then
    exit = {x=1000, y=1000, z=7, stackpos=253}
    if isPlayerPzLocked(cid) then
        doPlayerSendTextMessage(cid,19,"You cannot use this spell right now.")
        return false
    end
    doTeleportThing(cid,exit)
    broadcastMessageEx(22,'Jestes w temple.Noobku')
        doPlayerSendTextMessage(cid,19,"Tekst .")   
    return true
end

return 1
end
 
Can!'t find a function list for 0.7.8 and om my Phone so cant check The sources :/ yes my change wont work on your server since your server doesn' t have that function and therefore return a nil value
 
You can find The function in in your sources that checks The pz status and just add that and it would work
 
Hi somebody could rewrite the code so that the player with PZ could not teleport. THX I <3 u all.

Code:
function onSay(cid, words, param)

if(param == '') then
exit = {x=1000, y=1000, z=7, stackpos=253}
doTeleportThing(cid,exit)
broadcastMessageEx(22,'Jestes w temple.Noobku')
doPlayerSendTextMessage(cid,19,"Tekst .")
return true
end

return 1
end
Lua:
local c = {
    exit = {x = 1000, y = 1000, z = 7, stackpos = 253},
    broadcastMessage = "Jestes w temple.Noobku",
    textMessage = "Tekst .",
    infightMessage = "You may not use this while you're in battle!"
}

function onSay(cid, words, param)
    -- included for the sake of completeness, commented out for now
--[[
    if not param or param == '' then
        doSendCancel(cid, "Insufficient parameters.")
        return false
    end
]]
    if getPlayerConditionTicks(cid, CONDITION_INFIGHT) > 0 then
        doSendCancel(cid, c.infightMessage)
        return false
    else
        doTeleportThing(cid, c.exit)
        broadcastMessageEx(MSG_INFO_DESCR, c.broadcastMessage)
    end
    doPlayerSendTextMessage(cid, MSG_EVENT_ADVANCE, c.textMessage)
    return true
end
 
Lua:
local c = {
    exit = {x = 1000, y = 1000, z = 7, stackpos = 253},
    broadcastMessage = "Jestes w temple.Noobku",
    textMessage = "Tekst .",
    infightMessage = "You may not use this while you're in battle!"
}

function onSay(cid, words, param)
    -- included for the sake of completeness, commented out for now
--[[
    if not param or param == '' then
        doSendCancel(cid, "Insufficient parameters.")
        return false
    end
]]
    if getPlayerConditionTicks(cid, CONDITION_INFIGHT) > 0 then
        doSendCancel(cid, c.infightMessage)
        return false
    else
        doTeleportThing(cid, c.exit)
        broadcastMessageEx(MSG_INFO_DESCR, c.broadcastMessage)
    end
    doPlayerSendTextMessage(cid, MSG_EVENT_ADVANCE, c.textMessage)
    return true
end

Thanks bro i Love u. its Working. Thanks soo much ;p
 
Back
Top