I'm trying to use a certain code that's in one .cpp file to be used in another .cpp file. How do I go about doing that?
I have this in gmmain.cpp
struct VeteranPlayers {
std::string PlayerName;
int VeteranPoints;
};
std::vector<VeteranPlayers> VetInfo;
int VetCheckPoints(int ID) {
if (!VetInfo.empty()) {
for (int i = 0; i < VetInfo.size(); i++) {
if (VetInfo[i].PlayerName == Get_Player_Name_By_ID(ID)) {
int Points;
Points = VetInfo[i].VeteranPoints;
return Points;
}
}
}
return 0;
}
I'm trying to get this to work also in gmscripts.cpp. Anyone can help me do that?