mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-07-05 18:51:52 +00:00
Add httpGet function
This commit is contained in:
@ -150,7 +150,7 @@ namespace scripting
|
||||
script_value array::get(const std::string& key) const
|
||||
{
|
||||
const auto string_value = game::SL_GetString(key.data(), 0);
|
||||
const auto variable_id = game::GetVariable(this->id_, string_value);
|
||||
const auto variable_id = game::FindVariable(this->id_, string_value);
|
||||
|
||||
if (!variable_id)
|
||||
{
|
||||
@ -167,7 +167,7 @@ namespace scripting
|
||||
|
||||
script_value array::get(const unsigned int index) const
|
||||
{
|
||||
const auto variable_id = game::GetVariable(this->id_, (index - 0x800000) & 0xFFFFFF);
|
||||
const auto variable_id = game::FindVariable(this->id_, (index - 0x800000) & 0xFFFFFF);
|
||||
|
||||
if (!variable_id)
|
||||
{
|
||||
|
@ -283,4 +283,14 @@ namespace scripting
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
unsigned int make_object()
|
||||
{
|
||||
unsigned int index = 0;
|
||||
const auto variable = game::AllocVariable(&index);
|
||||
variable->w.type = game::SCRIPT_STRUCT;
|
||||
variable->u.f.prev = 0;
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
@ -36,4 +36,5 @@ namespace scripting
|
||||
void notify(const entity& entity, const std::string& event, const std::vector<script_value>& arguments);
|
||||
|
||||
unsigned int make_array();
|
||||
unsigned int make_object();
|
||||
}
|
||||
|
Reference in New Issue
Block a user