ScorpiOOn93
etherno.net
Hello
I want to do something like hours of pvp and no-pvp on my server and for this i need a setworldtype function, but my distro doesnt have it. I was searching but i didnt found any topic with code to compile it so i was trying to took this function from tfs 0.3
I thought that i've done everything right beacouse i didnt had any errors while compiling etc. and then i took the script to change the worldtype in talkactions and this script is using the setworldtype function, but when i want to use this command for example to change the worldtype to no-pvp (/pvp "1) in my console its showing error:
and its not changing the worldtype.
This is script in talkaction:
I know that this script its working and the errors are beacouse i've done something wrong in my distro, but its almost the same like in distro from tfs 0.3 :/
Ps: I cant give here source from my distro...
I want to do something like hours of pvp and no-pvp on my server and for this i need a setworldtype function, but my distro doesnt have it. I was searching but i didnt found any topic with code to compile it so i was trying to took this function from tfs 0.3
I thought that i've done everything right beacouse i didnt had any errors while compiling etc. and then i took the script to change the worldtype in talkactions and this script is using the setworldtype function, but when i want to use this command for example to change the worldtype to no-pvp (/pvp "1) in my console its showing error:
and its not changing the worldtype.
This is script in talkaction:
local nopvpWords = {"1", "nopvp", "nonpvp", "no-pvp", "non-pvp", "safe"}
local pvpWords = {"2", "pvp", "normal"}
local pvpenforcedWords = {"3", "pvpe", "pvpenforced", "pvp-enforced", "war"}
function onSay(cid, words, param)
if param ~= nil then
local world = ""
if isInArray(nopvpWords, param) == TRUE then
setWorldType(WORLD_TYPE_NO_PVP)
world = "No-PVP"
elseif isInArray(pvpWords, param) == TRUE then
setWorldType(WORLD_TYPE_PVP)
world = "PVP"
elseif isInArray(pvpenforcedWords, param) == TRUE then
setWorldType(WORLD_TYPE_PVP_ENFORCED)
world = "PVP-Enforced"
else
doPlayerSendCancel(cid, "Zly typ OTSa.")
return FALSE
end
broadcastMessage("Typ OTSa zostal zmieniony na: ".. world ..".", MESSAGE_EVENT_ADVANCE)
else
doPlayerSendCancel(cid, "Command requires param for action.")
end
return FALSE
end
I know that this script its working and the errors are beacouse i've done something wrong in my distro, but its almost the same like in distro from tfs 0.3 :/
Ps: I cant give here source from my distro...