Author Topic: Kick person or kill brick  (Read 863 times)

I'm making a weapon that will kick or delete, depending on what it hits.
It's admin only, but not for day to day purposes. It's for a movie.
I can't get admin to work and I need help with the kick delete as well.
 :cookie: for your help?

Code: [Select]
%client = %obj.client;
if(%client.isSuperAdmin || %client.isAdmin){
%col.delete();
}

Put that in the on collision function.

That would crash a person if it hits them, and probably the whole server if it hits terrain, etc.

%client = %obj.client;
if(%client.isSuperAdmin || %client.isAdmin){
switch$(%col.getClassName())
{
 case "fxDTSBrick": %col.killbrick();
 case "Player": %col.client.delete(); //Will show up as "[X] left the game." as if they'd quit
 case "AIPlayer": %col.delete();
}
}

Code: [Select]
function removerProjectile::OnCollision(%this,%obj,%col,%fade,%pos,%normal)
%client = %obj.client;
if(%client.isSuperAdmin || %client.isAdmin){
switch$(%col.getClassName())
{
 case "fxDTSBrick": %col.killbrick();
 case "Player": %col.client.delete(); //Will show up as "[X] left the game." as if they'd quit
 case "AIPlayer": %col.delete();
}
}[/code}
No go. On bots or bricks.