Author Topic: Command that detects Playertype Datablock  (Read 484 times)

How would I code a simple script that says

>When a user types /xyz
 >And his playertype datablock RIGHT NOW is xyz
 >Do this thing to the player
>

Code: [Select]
function serverCmdxyz(%client)
{
if(isObject(%client.player) && %client.player.getDataBlock().getName() $= "xyz")
%client.player.doThisThing();
}