Sajt
Deuce
Posts: 11 Joined: Fri Mar 14, 2014 12:56 pm
I'll look it on Supercool Curse of Hompy Kraken server(shotgun have grenade shoot)
-How me make it on python?
-i'll use it all weapon
starting,it possible?:
Code: Select all def on_shoot_set(self, fire):
if (self.shootngrenades and fire and
grenade_packet.value = 0.0
grenade_packet.player_id = 32
grenade_packet.position = position.get()
grenade_packet.velocity = (0.0, 0.0, 0.0)
self.protocol.send_contained(grenade_packet)
Help me please.
learn_more
Coder
Posts: 891 Joined: Sun Mar 24, 2013 9:59 pm
danhezee
Former Admin / Co-founder
Posts: 1710 Joined: Wed Oct 03, 2012 12:09 am
Not sure what you are asking but I think using the shotgun grenade launcher script with a modified babel script might be fun.
Sajt
Deuce
Posts: 11 Joined: Fri Mar 14, 2014 12:56 pm
Yes,the shotgun grenade launcher thought just like the zombies game mode Humans can.
Only shotgun know.
And sorry my bad english,learn_more
danhezee
Former Admin / Co-founder
Posts: 1710 Joined: Wed Oct 03, 2012 12:09 am
I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select all from pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
Kuma
Scripter
Posts: 758 Joined: Fri Mar 22, 2013 10:05 am
danhezee wrote:
I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select all from pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
oh god, dat indentation
learn_more
Coder
Posts: 891 Joined: Sun Mar 24, 2013 9:59 pm
danhezee wrote:
I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select all from pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
i doubt it, i think he meant to spam in every possible way, since he's also sending pm's out to people replying here.
epicfacethe3rd
Deuced Up
Posts: 395 Joined: Fri Sep 27, 2013 11:07 pm
Location: womanizing your daughter
Contact
sorry if I sound like an idiot that can't code/read python (I can't.), but what if the grenades exploded upon hitting something?
CLICK
Fuck this shit I'm out.
It's all bloodfox's fault. Fuck him.
sicut principium, sicut finis. quasi ad amicum, quasi hostis.
1Shot1Kill
Modder
Posts: 1707 Joined: Sun Mar 02, 2014 5:53 pm
Location: why am i still here
Contact
epicfacethe3rd wrote:
sorry if I sound like an idiot that can't code/read python (I can't.), but what if the grenades exploded upon hitting something?
Do you even know what necrposting means?
insert witty quote here like the cool kids do
Who is online
Users browsing this forum: No registered users and 2 guests