/mount Player, Id
work with TFS 0.3+, 0.4+
________________________________________________
work with TFS 0.3+, 0.4+
________________________________________________
- Command:
PHP:/mount Alehopper, 1
- Screenshot:
- Installation:
-
PHP:
<talkaction log="yes" words="/mount" access="5" event="script" value="mount.lua"/>
-
Code:
function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") t[1] = tonumber(t[1]) if(not t[1]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.") return true end local pid = cid if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end doPlayerAddMount(pid, t[1]) doSendMagicEffect(getThingPosition(pid), CONST_ME_MAGIC_BLUE) return true end
-
________________________________________________
- Programmer: Alehopper
- Tester: Siramix
Last edited: