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

Request new talkaction

Frillinde

Founder: Another Realm
Joined
Jan 16, 2012
Messages
148
Reaction score
3
Location
his computer
I tried to do this but was stumped(lol), as usual .

Its should give player a full food level and send a msg " Bob has made you a meal.You are full." Instead of Bob its should use the admins name of course...;)

If a player has eaten something it should still refill his food level to max same as if he hadnt eaten.

Thanks for any help


<talkaction log="yes" words="/feed" access="4" event="script" value="feed.lua"/>
 
Dam didnt read whole thing :/ so this script is like this !food you get full:

Code:
function onSay(cid, words, param)

	if getPlayerStorageValue(thing, 1009) - feed < 0 then
		setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
			setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are full.")
end
return true
end
 
That script will give errors.
Try something like this:
LUA:
function onSay(cid, words, param)
if not param then
	return false,doPlayerSendCancel(cid,"Please input a parameter!")
end

local pid = getPlayerByNameWildcard(param)
if not isPlayer(pid) then
	return false,doPlayerSendCancel(cid,"Please input a player name!")
end
doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(cid).. " fed you!")
doPlayerFeed(pid,500)
return true
end
you can then do
/yourcommandname Dudeim
and he will be full(er) dunno if 500 is completely full just play with the value.
 
Back
Top