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

Vip Status OnLook

Joined
Sep 29, 2009
Messages
224
Reaction score
0
If player have vip add OnLook (vip).

or

I need vip system with player storage (5009).
 
Last edited:
data/creaturescripts/creaturescripts.xml
LUA:
<event type="look" name="Look" event="script" value="vip.lua"/>
data/creaturescripts/scripts/login.lua (att before "return TRUE")
LUA:
	registerCreatureEvent(cid, "Look")
data/creaturescripts/scripts/vip.lua
LUA:
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) == false then
		return true
	end

	local storage = 5009
        if getPlayerStorageValue(thing.uid, storage) == -1  then
		doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." isn't a vip player.")
	else
		doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is a vip player.")
	end
	return true
end
Not tested.
 
Last edited:
With isVip():
LUA:
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) == false then
		return true
	end

        if isVip(getPlayerAccount(thing.uid)) == false  then
		doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." isn't a vip player.")
	else
		doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is a vip player.")
	end
	return true
end
 
Ohh Thanks :D

And For I Make >
15:51 You see Banished (Level 26). He is a knight. He is Leader of the Bonde Do Mal. ( Noob Paks ). (vip).

And For The WebSite Vip Status:
+/- \/
PHP:
   $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Vip Status:</TD>';
                         $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch();
         		   if($vip == false) {
        		    $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';
        		    }
        		    else
       			     {
       		          $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';
          		  }

THX FOR HELP ME ;]
 
Back
Top