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

Lua getPlayerName?

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
Hi, this doesn't work:
LUA:
doPlayerSay(getPlayerName(cid), "Aaaah...", TEXTCOLOR_ORANGE)
doPlayerAddMana(cid, math.random(100, 210))

Please help me!

Error: LuaDoPlayerSay<>. Player not found
 
I believe you should put "cid" instead of "getPlayerName(cid)". I think it wants the player object there and not the players name. Thats why it cant find the player.

My two thoughts.

-Zeke
 
Last edited:
doPlayerSay(cid, "Aaaah...", TEXTCOLOR_ORANGE)
doPlayerAddMana(cid, math.random(100, 210))

I think.. Try it and let me know :)
 
I pulled this right out of my potion script so I know it works,

Code:
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)

Hope it helps :)
 
Just tested some stuff out,

If you want the player to say it.. (shows up in the chat window), you can use this

Code:
		doCreatureSay(cid, "Aaaah...", 1)

Or

Code:
		doPlayerSay(cid, "Aaaah...", 1)

It does not like the talktypeorange when a player is trying to say it.

If you want it to show up in the orange color, I don't think you use doPlayerSay or doCreatureSay with a person. The item does in fact work though.

Hope this helped.:)
 
Back
Top