L'In20Cible wrote:Since you are not giving your complete code (like everytime you ask for help), I will assume it is complete and answer you that's normal if you are not getting them since those functions are never called.
heres the full code
Syntax: Select all
from events import Event
from players.entity import PlayerEntity
from players.helpers import index_from_userid
from messages import SayText2
from weapons.manager import weapon_manager
from tools import server_tools
from entities.helpers import edict_from_index
from entities.entity import BaseEntity
from entities.helpers import pointer_from_index
from engines.server import engine_server
@Event
def player_jump(game_event):
index = index_from_userid(game_event.get_int('userid'))
player = PlayerEntity(index)
give_sg(player)
give_he(player)
give_ak(player)
def give_ak(player):
index = server_tools.create_entity('weapon_ak47')
edict_from_index(index).set_key_value_vector('orig in', player.m_vecOrigin)
server_tools.spawn_entity(index)
def give_sg(player):
index = server_tools.create_entity('weapon_smokegrenade')
edict_from_index(index).set_key_value_vector('orig in', player.m_vecOrigin)
server_tools.spawn_entity(index)
def give_he(player):
index = server_tools.create_entity('weapon_hegrenade')
edict_from_index(index).set_key_value_vector('orig in', player.m_vecOrigin)
server_tools.spawn_entity(index)
its spawning smoke grenade now........ but not he grenade............
here is a video of it in action
some very weird behavior
around 20 sec i throw my sg then i pick up all up the sg on the ground but it does not show up in my inventory to the right and i can't switch to it either @@
after testing some more it seems like you to have drop the original ak that was spawned before it'll start spawning smokegrenade and for it to show up in your inventory
kinda like the c4 problem i posted
heresome more testing showed i need to buy a HE first before it'll spawn HE ... but it'll sometimes spawn HE by itself or both HE or SG ............ so weird !?