![]() |
Gun Script
my gun can only attack like a sword, and i need to make it so it fires from afar, can someone help me?
__________________________________________________ ________ //#CLIENTSIDE function onCreated() { client.max_m16_ammo = 100; client.m16_ammo= 100; this.m16_on = 0; } function onWeaponFired() { if (this.m16_on = 0) { this.m16_on = 1; if (this.m16_on == 1 && client.m16_ammo > 0) { replaceani("walk", "nightmare_m16_walk"); replaceani("idle", "nightmare_m16_idle"); replaceani("sword", "nightmare_m16_fire"); } else if (this.m16_on == 1 && client.m16_ammo == 0) { replaceani("walk", "nightmare_m16_walk"); replaceani("idle", "nightmare_m16_idle"); replaceani("sword", "nightmare_m16_reload"); } } else if (this.m16_on == 1) { this.m16_on = 0; replaceani("walk", "walk"); replaceani("idle", "idle"); replaceani("sword", "sword"); } } function onKeyPressed(keycode, keychar) { if (this.harpo_on == 1 && keychar == "r") { if (client.harpo_ammo == 0) { setani("nightmare_m16_reload", " "); client.m16_ammo = client.max_m16_ammo; } } if (keychar == "s" && client.m16_ammo > 0) { client.m16_ammo -= 1; setshootparams("damage", 10); temp.shootangle = getangle(vecx(player.dir), vecy(player.dir)); shoot(player.x+vecx(player.dir), player.y+vecy(player.dir), player.z, temp.shootangle, 0, 0, "nightmare_m16_bullet", NULL); } } |
gs1 much?
|
Quote:
|
Edit: Ugh.. another old thread successfully answered two years too late. Thanks again trash talking jamerson.
I take it you're making a gun server, and you're going to want to disable pretty much all obvious classical systems, these are pretty much all the functions you should call. PHP Code:
|
Wooow. This is pretty useless. I made this 2 years ago when i tried making Final Resort. But if you manage to fix this script, you can use it on your servers.
|
| All times are GMT +2. The time now is 04:35 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.