You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can make get_entvar_int, get_entvar_float, etc. (+set) as in engine module, but with more type-safety and auto-converting float<->int. This can be done via default get_entvar directly in .inc.
@WPMGPRoSToTeMa If you can do it I think it will be great for me, but you need to at least hold a vote among scripters need it and how it will affect the speed of the engine, which is better amxx in the data lead to the desired type or here such conversions. So how to make it 1 standard to not have one in the float data writes, the other to an integer, and черт ногу сломит, where, in what place he what type of uses.
Можно я по русски, а то тяжело на не родном языке писать... На мой взгляд конструкция get_entvar(id,var_*****,def_type_data=float), set_entvar(id,var_*,,def_type_data=float), соответственно если нужно будет преобразование типа данных просто указать в последнем аргументе тип данных.
Activity
jesuspunk commentedon Mar 2, 2017
Переделал на float тип данных перестало отображаться в табе количество фрагов всегда 0, но по id получает все верно.
player_setScore(id, iAddFrags, iAddDeaths)
{
//new iFrags = get_user_frags(id)
//reapi
new Float:iFrags = get_entvar(id,var_frags)
client_print(id,print_chat,"%f",iFrags)
//new iDeaths = cs_get_user_deaths(id)
//reapi
new iDeaths = get_member(id,m_iDeaths)
theAsmodai commentedon Mar 2, 2017
Because it has float type in the engine.
hajimura commentedon Mar 2, 2017
@theAsmodai, why this member has float type in the engine? Is it necessary?
theAsmodai commentedon Mar 2, 2017
@Phantomsq, ask John Carmack.
WPMGPRoSToTeMa commentedon Mar 2, 2017
We can make
get_entvar_int,get_entvar_float, etc. (+set) as inenginemodule, but with more type-safety and auto-converting float<->int. This can be done via defaultget_entvardirectly in .inc.jesuspunk commentedon Mar 3, 2017
@WPMGPRoSToTeMa If you can do it I think it will be great for me, but you need to at least hold a vote among scripters need it and how it will affect the speed of the engine, which is better amxx in the data lead to the desired type or here such conversions. So how to make it 1 standard to not have one in the float data writes, the other to an integer, and черт ногу сломит, where, in what place he what type of uses.
Можно я по русски, а то тяжело на не родном языке писать... На мой взгляд конструкция get_entvar(id,var_*****,def_type_data=float), set_entvar(id,var_*,,def_type_data=float), соответственно если нужно будет преобразование типа данных просто указать в последнем аргументе тип данных.
WPMGPRoSToTeMa commentedon Mar 3, 2017
@Vaqtincha it can be done without adding new natives, we can make this as an 3rd-party .inc. Current natives aren't type-safe.