06-03-2011, 05:46
I am making a mod that is based on the telekinetic roll on RTD. I have everything ready but I am wanting to make it so I can turn off and on the telekinetic shooting. I have tried this and it has not worked. I put that into the the onplayerspawned();
I then added this.
It somewhat works as when you first spawn you can turn it on but can't turn it back off then when you respawn you lose the weapon you should have and can only turn it on.
PHP Code:
for(;;)
{
while(!self useButtonPressed())
wait 0.05;
doTelekinetic();
wait 0.5;
while(!self useButtonPressed())
wait 0.05;
self notify("stopkinetic");
wait 0.5;
}
I then added this.
PHP Code:
doTelekinetic()
{
self endon("death");
self endon("stopkinetic");
//telekinetic code here
}