Ayuto / EventScripts-Emulator

A Source.Python plugin that is able to run EventScripts addons.
16 stars 9 forks source link

es playerget primary and secondary #37

Open ReQ220 opened 4 years ago

ReQ220 commented 4 years ago

Hi! I am trying to get the primary or secondary player's weapon. I'm getting errors.

block load
{
    es_xset secondary_variable 0
    es_xset primary_variable 0
}

event player_jump
{
    es playerget primary primary_variable event_var(userid)
    es playerget secondary primary_variable event_var(userid)
    es_msg server_var(primary_variable) is the primary weapon!
    es_msg server_var(secondary_variable) is the secondary weapon!
}

image

Ayuto commented 4 years ago

What's the output of sp info?

ReQ220 commented 4 years ago
--------------------------------------------------------
Checksum      : 58e1345a0443ab64c00095c0b9860b71
Date          : 2020-04-13 08:33:14.169311
OS            : Linux-2.6.32-042stab142.1-x86_64-with-centos-7.4.1708-Core
Game          : csgo
SP version    : 695
Github commit : 92b3adfaaaf1bb9ecd2be1ddad55bc68589b4152
Server plugins:
   00: Source.Python, (C) 2012-2019, Source.Python Team.
   01: Metamod:Source 1.10.7-dev
SP plugins:
   00: es_emulator, https://github.com/Ayuto/EventScripts-Emulator
   01: wcs, 2020.03.29-2, https://forums.sourcepython.com/viewtopic.php?f=7&t=1925
--------------------------------------------------------
NosferatuJoe commented 3 years ago

This might've been fixed with this #44 , please verify.