Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-29-2009, 08:08 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Cool gunscript not doing dmg to people

NPC Code:
//#CLIENTSIDE
function onCreated() {
this.firerate = .2;
}

function onWeaponFired() {
while (keydown(4)) {
FireGun();
sleep(this.firerate);
}
}

function FireGun() {
setani("millenium_scar-fire", "");

this.spread=.053;
this.speed=5;
this.reload=50;
this.load=50;

temp.angl = getangle(vecx(player.dir), vecy(player.dir))+random(this.spread*-1,this.spread);
shoot(player.x + 0.5 + vecx(player.dir), player.y + vecy(player.dir), player.z, temp.angl, 0, 0, "mil_bullets", player.dir);
}
function onActionProjectile()
{
if (clientr.hp>=0) {
setani hurt,;
}
}




the problem is that when i shoot people they set ani hurt

but for some people nothing happens


ps

sorry about my gs1 habbits

im doing a little bit better with gs2 tho
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.