Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

// This file should only be included in one place.
#include "pawn.hpp"
#include <Server/Components/Pawn/pawn.hpp>

#if defined PAWN_NATIVES_HAS_FUNC
#include <pawn-natives/NativesMain.hpp>
Expand Down
1,366 changes: 1,366 additions & 0 deletions SDK/include/Server/Components/Pawn/Impl/pawn_natives.hpp

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion SDK/include/Server/Components/Pawn/pawn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <Server/Components/GangZones/gangzones.hpp>
#include <Server/Components/Menus/menus.hpp>
#include <Server/Components/Objects/objects.hpp>
#include <Server/Components/Pawn/pawn.hpp>
#include <Server/Components/Pickups/pickups.hpp>
#include <Server/Components/Recordings/recordings.hpp>
#include <Server/Components/TextDraws/textdraws.hpp>
Expand Down
1,280 changes: 0 additions & 1,280 deletions SDK/include/Server/Components/Pawn/pawn_natives.hpp

This file was deleted.

7 changes: 6 additions & 1 deletion Server/Components/Pawn/Scripting/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "../Manager/Manager.hpp"
#include "Impl.hpp"
#include "sdk.hpp"
#include <Server/Components/Pawn/pawn_natives.hpp>
#include <Server/Components/Pawn/Impl/pawn_natives.hpp>

namespace pawn_natives
{
Expand All @@ -40,6 +40,11 @@ class ParamCast<PawnScript&>
return *value_;
}

bool Error() const
{
return false;
}

static constexpr int Size = 0;

private:
Expand Down
3 changes: 2 additions & 1 deletion Server/Components/Pawn/Scripting/Vehicle/Natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@ SCRIPT_API(VehicleCanHaveComponent, bool(int modelid, int componentid))
return Impl::isValidComponentForVehicleModel(modelid, componentid);
}

SCRIPT_API(GetRandomCarColPair, void(int modelid, int& colour1, int& colour2, int& colour3, int& colour4))
SCRIPT_API(GetRandomCarColPair, bool(int modelid, int& colour1, int& colour2, int& colour3, int& colour4))
{
getRandomVehicleColour(modelid, colour1, colour2, colour3, colour4);
return true;
}

SCRIPT_API(CarColIndexToColour, int(int colourIndex, int alpha))
Expand Down
2 changes: 1 addition & 1 deletion lib/pawn-natives