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

Solved getplayer name in a lua script? (movement)

Xeikh

詠春 ☯
Joined
Oct 23, 2009
Messages
724
Reaction score
17
LUA:
function onStepIn(cid, item, position, fromPosition)
 
if isPlayer(cid) == true then   
if getPlayerVipDays(cid) == 0 then
        doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(getPlayerPosition(cid), 3)
        doCreatureSay(cid, "VIP Only. Get your VIP at Website Donation Rewards!", TALKTYPE_ORANGE_2)
        return
    end
 
        doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_2)
        doSendMagicEffect(getPlayerPosition(cid), 12)
        return true
end
end

Hi, im using a tile script for the vip players

but i want to change this:
LUA:
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_2)

But instead of say "welcome vip player!" it say "Welcome PLAYERNAME" for sample: "Welcome Xeikh".. like the function of npc's |PLAYERNAME|... i did try that but dont works... can please someone help me?:$
 
Last edited:
LUA:
function onStepIn(cid, item, position, fromPosition)
 
if isPlayer(cid) == true then   
if getPlayerVipDays(cid) == 0 then
        doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(getPlayerPosition(cid), 3)
        doCreatureSay(cid, "VIP Only. Get your VIP at Website Donation Rewards!", TALKTYPE_ORANGE_2)
        return
    end
 
        doCreatureSay(cid, "Welcome ".. getPlayerName(cid) .."\nVIP Player!", TALKTYPE_ORANGE_2)
        doSendMagicEffect(getPlayerPosition(cid), 12)
        return true
end
end
 
Back
Top