• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Compiling Who pushed you ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I need to add in C++ an information about push.
When another player push me i receive that message in console:
"You have been pushed by playerpushnick"

Anyone can help me ? :)
 
At creaturscripts

LUA:
function onPush(cid, target)
	if not isPlayer(target) or cid == target then return true end
	return doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "You have been pushed by " .. getCreatureName(cid))
end

XML:
<event type="push" name="playerPush" event="script" value="push.lua"/>

And this at login.lua
LUA:
registerCreatureEvent(cid, "playerPush")
 
Last edited:
At creaturscripts

LUA:
function onPush(cid, target)
	if not isPlayer(target) or cid == target then return true end
	return doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "You have been pushed by " .. getCreatureName(cid))
end

XML:
<event type="push" name="playerPush" event="script" value="push.lua"/>

And this at login.lua
LUA:
registerCreatureEvent(cid, "playerPush")

Who needs C++ when we have darkhaos?
 
Last edited:
Back
Top