Forcing a player to use a weapon

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Forcing a player to use a weapon

Postby BackRaw » Tue Oct 07, 2014 10:25 pm

Hi,

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

Source.Python: https://github.com/backraw
User avatar
satoon101
Project Leader
Posts: 2703
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Oct 07, 2014 10:43 pm

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>)
Image
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Tue Oct 07, 2014 10:51 pm

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.
My Github repositories:

Source.Python: https://github.com/backraw

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 102 guests