For some reason, it's still not working. Did I mention there was a second command? It's to un Blind the person. Here is the entire code:
function servercmdblind(%client, %user)
{
if(!%client.isAdmin)
{
messageClient(%client, '', '\c6You must be an Admin to use this command');
return;
}
if(%user !$= "")
{
%player = findClientByName(%user).player;
%playern = FindclientByName(%user);
if(!isObject(%player))
{
messageClient(%Client, '', '\c6That player hasnt spawned yet!');
return;
}
else
{
WhiteOut(%player);
messageAll("", '\c3%1\c6 was Blinded by \c3%2', %playern.name, %client.name);
messageClient(%player, '', '\c6You were blinded by \c3%1', %client.name);
}
function Whiteout(%player)
{
if(!isObject(%player))
return;
%player.setWhiteout(1000);
%player.whiteoutsch = schedule(100,0,"Whiteout",%player);
}
function Servercmdunblind(%Client, %user, %player, %playern)
{
if(!%client.isAdmin)
{
messageClient(%client, '', '\c6You must be an Admin to use this command');
return;
}
if(!isObject(%player))
{
messageClient(%Client,'', '\c6That player hasnt spawned yet!');
return;
}
if(%user !$= "")
{
cancel(%player.whiteoutsch);
messageAll("", '\c3%1 \c6has un blinded \c3%2', %playern.name, %client.name);
messageClient(%player, '', '\c3%1 \c6 has un blinded you.', %Client.name);
}
}
}
Now here is the syntax in the console (I just took a chunk of the script and put the error halt where it was in the console):
{
WhiteOut(%player);
messageAll("", '\c3%1\c6 was Blinded by \c3%2', %playern.name, %client.name);
messageClient(%player, '', '\c6You were blinded by \c3%1', %client.name);
}
function ##W##hiteout(%player) <<< (this is not in the real code, here so it's not so hard to find the error)
{
if(!isObject(%player))
return;
%player.setWhiteout(1000);
%player.whiteoutsch = schedule(100,0,"Whiteout",%player);
}
function Servercmdunblind(%Client, %user, %player, %playern)
{
Could someone tell me why this is syntaxing?