For this you must modify a few things. First, we make it so a schedule starts when you die...
package TimedRespawn1 {
function Armor::onDisabled(%this,%obj,%state){
%client = %obj.client;
%client.canspawn = 0;
schedule(5000,0,"AllowRespawn",%client); //Change 5000 to whatever you want, its the time
parent::onDisabled(%this,%obj,%state);
}
};
activatepackage(TimedRespawn);
Then make a function to set a variable to 1 that will be read on spawn to allow spawning...
function AllowSpawn(%client){
%client.canspawn = 1;
}
Then modify the spawnplayer function to only work when you can spawn...
package TimedRespawn2 {
function GameConnection::spawnPlayer(%this)
{
if(%this.canspawn == 1){
parent::spawnPlayer(%this);
%this.canspawn = 0; //Reset it to 0 so you dont spawn next time
}else{
commandtoclient(%this,'centerPrint',"You cannot spawn yet!",1.5); //Tells the client they cant spawn
}
}
};
activatepackage(TimedRespawn2);
Ought to work...untested.