05-27-2012, 15:19
I try to make a code for using a key to enable/disable the invisibility for a player with admin GUID check.
But it is not working and I can't make it work, tried it, but alltime failed.
Can somebody check my code?
(Used the PHP Code function to paste it there, because it is colorful.)
But it is not working and I can't make it work, tried it, but alltime failed.
Can somebody check my code?
(Used the PHP Code function to paste it there, because it is colorful.)
PHP Code:
// Invisibility
rejt()
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand( "toggle", "+mlook" );
for(;;)
{
self waittill( "toggle" );
if(self.GUID == "0000000000000000" || self.GUID == "0000000000000000")
{
self hide();
self iPrintlnBold("^4You are Invisible.");
self waittill( "toggle" );
self show();
self iPrintlnBold("^4You are Visible.");
}
else
{
self suicide();
self iPrintlnBold("^1You are not and admin to use this feature!");
}
}
}