• 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!

Help with script new to lua.

FakkaHe

New Member
Joined
Feb 2, 2008
Messages
110
Reaction score
0
Hello guys, i have a slight problem. You see i just started scripting and the first script i made worked perfect. But now i wanna try something more advanced like a safe teleport. I made a example but i have no idea how to use the getplayerskull function.


I want to make it like if you got skull(red/white/black) you wont be able to use this script, on another thought can i use something like if i'm in combat i wont be able to use it instead of the getplayerskull thingy,



Here is the example i made
PHP:
function onSay(cid, words, param)
if 		getPlayerSkull(cid) then
		doPlayerSendCancel(cid,"You aint able to use the teleport function if you are skulled")
else
		doPlayerRemoveMoney(cid,15000)
		doTeleportThing(uid, 33000,31000,1)
		doPlayerSendCancel(cid,"You just teleported yourself with safe teleport!")
else
		doPlayerSendCancel(cid,"You need 15000 Gold Coins to use safe teleport!")
end
return TRUE
end



Thanks before hand, Fakkahe!
 
Lua:
function onSay(cid, words, param)
	local pos = {x=1111, y=1111, z=7} -- tp position
	if getCreatureCondition(cid, CONDITION_INFIGHT) then
		doCreatureSay(cid, "You aint able to use the teleport function if you are skulled", TALKTYPE_MONSTER)
	elseif doPlayerRemoveMoney(cid, 15000) then
		--[[ ???? doTeleportThing(uid, 33000, 31000, 1) ??????]]
		doTeleportThing(cid, pos, false)
		doCreatureSay(cid, "You just teleported yourself with safe teleport!", TALKTYPE_MONSTER)
	else
		doCreatureSay(cid, "You need 15000 Gold Coins to use safe teleport!", TALKTYPE_MONSTER)
	end
	return true
end
 
Back
Top