Author Topic: Trying to mod an Zat-gun, need help with script  (Read 739 times)

Hey
Im trying to mod an zat-gun for retail. Now i just need help with the script to stun the person for around 10 seconds, if the person is shot when its stunned it dies. If you dont get it, easier description:

Person with gun - shoots another person - person that is shot - stunned for 10 secs - the stunned person gets shot - dies. - If not - he survive - if he gets shot without the stun limit - he gets stunned again.

Please help me xD
This will be my first mod, and of course i will credit ya that helps.

Code: [Select]
function zatgunImage::OnCollision(%this, %obj, %col, %fade, %pos, %normal){
 if(%col.getClassname() $= "Player"){
   %col.client.isStunned = 1;
   schedule(10000,0,unstun,%col.client);
   }
}

function unstun(%client){
 if(isObject(%client)){
   %client.isStunned = 0;
   }
}

I don't know about the not moving bit, I was going to edit the move functions but they don't have the client variable in them.

Oh yeah - And i also need an model :D

I'd do it on the player object not the client in case they Self Delete etc.

Maybe use something like Tumble() for "can't move".