Page 1 of 1

Forcing a player to use a weapon

Posted: Tue Oct 07, 2014 10:25 pm
by BackRaw
Hi,

can we already do es.cexec(userid, 'use', 2) - or es.sexec, can't remember? =)

Posted: Tue Oct 07, 2014 10:43 pm
by satoon101
This should work (I think):

Syntax: Select all

from engines.server import engine_server

engine_server.client_command(<index>, 'use <weapon_name>')


Eventually this will work once the entities_changes branch is complete:

Syntax: Select all

PlayerEntity(<index>).equip_weapon(<weapon pointer>)

Posted: Tue Oct 07, 2014 10:51 pm
by BackRaw
satoon101 wrote:This should work (I think):

Syntax: Select all

from engines.server import engine_server

engine_server.client_command(<index>, 'use <weapon_name>')


Eventually this will work once the entities_changes branch is complete:

Syntax: Select all

PlayerEntity(<index>).equip_weapon(<weapon pointer>)

Perfect, thanks.