Skip to content

Commit

Permalink
fix(server): triggerClientRpcAnswer by error
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Feb 23, 2024
1 parent 2621da6 commit f7c10dc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions c-api/core.cpp
Expand Up @@ -1040,8 +1040,14 @@ void Core_SetMigrationDistance(alt::ICore* core, uint32_t limit)

void Core_TriggerClientRPCAnswer(alt::ICore* core, alt::IPlayer* target, uint16_t answerID, alt::MValueConst* answer, const char* error)
{
if(answer == nullptr) return;
core->TriggerClientRPCAnswer(target, answerID, answer->get()->Clone(), error);
if (answer == nullptr)
{
core->TriggerClientRPCAnswer(target, answerID, nullptr, error);
}
else
{
core->TriggerClientRPCAnswer(target, answerID, answer->get()->Clone(), error);
}
}

uint16_t Core_TriggerClientRPCEvent(alt::ICore* core, alt::IPlayer* target, const char* ev, alt::MValueConst* args[],
Expand Down

0 comments on commit f7c10dc

Please sign in to comment.