Author Topic: Admin only spawn point placing  (Read 1464 times)

I don't know the specific name for the spawn point brick, and I'm hoping for something small enough to eval.
So please correct me if I'm wrong:
function spawnPoint::onPlant(%this,%cl,%pos){if(%cl.isAdmin){parent::onPlant(%this,%cl,%pos);}}

The name is brickSpawnPointData.

I believe that there's only a single argument (the brick) in ::onPlant. Also, you'd want to first call the parent, and if the client is not an admin then delete the brick.

The name is brickSpawnPointData.

I believe that there's only a single argument (the brick) in ::onPlant. Also, you'd want to first call the parent, and if the client is not an admin then delete the brick.
Even if, the function will echo "rawr", but won't stop me from planting the brick with:

Code: [Select]
package lol
{
function brickSpawnPointData::onPlant(%this,%obj)
{
if(%obj.client.isAdmin)
{
echo("rawr");
return;
}
}
}; activatepackage("lol");

That's why I said you have to *delete* the brick.

Alternately, if you don't want the sound and visual effect of a brick planting, then being deleted, you could package servercmdplantbrick instead

That's why I said you have to *delete* the brick.
My bad, I can't properly read.