Command and Conquer: Renegade Official Forums - RDF feed
type: channel
description: C&C: Renegade --> Dying since 2003™, resurrected in 2024!
items: Veteran Plugin.
items: Re: Veteran Plugin.

Veteran Plugin.
type: item
description: Does anybody know of any veteran plugins with the soruce? Thanks in advance.
creator: cnc95fan
date: 2007-12-01T11:42:49-00:00

Re: Veteran Plugin.
type: item
description: The was a link to one spammed all over these forums, but it was removed. I don't know why. Possibly becuase the source code wasn't included. I never got around to making mine a plug-in, but your welcome to the source code for it.
creator: reborn
date: 2007-12-01T11:55:50-00:00

Re: Veteran Plugin.
type: item
description: Really? Thanks a million, I havn't seen you on irc in a while though...
creator: cnc95fan
date: 2007-12-01T12:08:33-00:00

Re: Veteran Plugin.
type: item
description: im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing.
creator: Gen_Blacky
date: 2007-12-02T19:19:47-00:00

Re: Veteran Plugin.
type: item
description: Yeah well certain people like checking a gifted horses mouth. -Ghost-
creator: Ghostshaw
date: 2007-12-02T21:30:44-00:00

Re: Veteran Plugin.
type: item
description: Gen_Blacky wrote on Sun, 02 December 2007 14:19 im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing. //****************************************************************************** //******************************* VETERAN STUFF ******************************** struct VeteranPlayers { std::string PlayerName; int VeteranPoints; }; std::vector<VeteranPlayers> VetInfo; void VetUpdate(int ID, int number, int score) { if (!VetInfo.empty()) { for (int i = 0; i < VetInfo.size(); i++) { if (VetInfo[i].PlayerName == Get_Player_Name_By_ID(ID)) { int cvp, now; cvp = VetInfo[i].VeteranPoints; now = number + cvp; VetInfo[i].VeteranPoints = now; int Team; Team = Get_Team(ID); if (cvp < 100 && now >= 100) { char Promote[255]; sprintf(Promote,"msg Veteran: %s just got promoted to the rank of General", Get_Player_Name_By_ID(ID)); Console_Input(Promote); if (Team == 0) { sprintf(Promote, "ppage %d Kane has recognised your vision, you have been promoted to General, enjoy the extra 45HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("bonus_complete.wav"); } else { sprintf(Promote, "ppage %d Locke himself has promoted you to a General, enjoy the extra 45HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("bonus_complete.wav"); } Console_Input(Promote); } else if (cvp < 60 && now >= 60) { char Promote[255]; sprintf(Promote,"msg Veteran: %s just got promoted to the rank of Brigadier", Get_Player_Name_By_ID(ID)); Console_Input(Promote); if (Team == 0) { sprintf(Promote, "ppage %d The Brotherhood of Nod likes your style, you are promoted to rank Brigadier, enjoy the extra 30HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("m00bgwf_kill0031i1nbrs_snd.wav"); } else { sprintf(Promote, "ppage %d Keep em coming! you done all that left handed? You are promoted to Brigadier, enjoy the extra 30HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("m00achk_k…
creator: reborn
date: 2007-12-03T16:55:07-00:00

Re: Veteran Plugin.
type: item
description: Just something you should worry about, but otherwise it's good. Get_Player_Name Get_Player_Name_By_ID Get_Wide_Player_Name Get_Wide_Player_Name_By_ID WideCharToChar CharToWideChar need to be (delete [])-ed const char *pName = Get_Player_Name_By_ID(10); if(pName) { //use delete []pName; }
creator: jnz
date: 2007-12-03T20:11:08-00:00

Re: Veteran Plugin.
type: item
description: Gen_Blacky wrote on Sun, 02 December 2007 14:19 im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing. People do share, but some get annoyed when others demand the source be released
creator: Hex
date: 2007-12-03T20:30:13-00:00

Re: Veteran Plugin.
type: item
description: Thanks mate
creator: cnc95fan
date: 2007-12-03T20:55:13-00:00

Re: Veteran Plugin.
type: item
description: RoShamBo wrote on Mon, 03 December 2007 15:11 Just something you should worry about, but otherwise it's good. Get_Player_Name Get_Player_Name_By_ID Get_Wide_Player_Name Get_Wide_Player_Name_By_ID WideCharToChar CharToWideChar need to be (delete [])-ed const char *pName = Get_Player_Name_By_ID(10); if(pName) { //use delete []pName; } Just call roshambo the plumber from now on. Hex wrote on Mon, 03 December 2007 15:30 Gen_Blacky wrote on Sun, 02 December 2007 14:19 im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing. People do share, but some get annoyed when others demand the source be released Well, I really don't see the point in with-holding it. Sure, someone might change some stuff, they might add a blue medal instead of a green one. Or they might make it some crazy extreme veteran system. They might change it drastically and call it there own. Someone might spot some leaky ass code and post it right after you post your source. Who cares? People will learn from your code, they might see something and it just clicks. Oh that's why it has it's own separate function, it's called in three different places, so you re-use that code. Or whatever... The worst that's gonna happen is it doesn't really work that well, people rip it off, or people laugh at your crappy code. The best that could happen is a bunch of players enjoy the system, and some eager server owners gets interested or learns from your code. He might be able to make some improvements... Look at SSGM, i'm pretty sure if it wasn't for vloktboky then we wouldn't have that right now. But it's only because Whitedragon carried it on that it is what it is today. Yet allot people on this forum wont of even heard of him. Don't let your own ego get in the way. It's the hardest thing to let go of in life.
creator: reborn
date: 2007-12-03T23:13:52-00:00

Re: Veteran Plugin.
type: item
description: When you post the source code to your program people will look at it and tell you how to improve it. Insults or not, you're learning from them. Someone calling you a "noob" at renegade is no different from when another programmer calls another programmer a "noob". Do you listen to other people in renegade? Why should you in anything else?
creator: jnz
date: 2007-12-03T23:38:37-00:00

Re: Veteran Plugin.
type: item
description: Hex wrote on Mon, 03 December 2007 14:30 Gen_Blacky wrote on Sun, 02 December 2007 14:19 im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing. People do share, but some get annoyed when others demand the source be released yes that is true reborn wrote on Mon, 03 December 2007 10:55 Gen_Blacky wrote on Sun, 02 December 2007 14:19 im surprised some 1 would release there Veteran system. theres like 3 or more going around in ren but people don't like sharing. //****************************************************************************** //******************************* VETERAN STUFF ******************************** struct VeteranPlayers { std::string PlayerName; int VeteranPoints; }; std::vector<VeteranPlayers> VetInfo; void VetUpdate(int ID, int number, int score) { if (!VetInfo.empty()) { for (int i = 0; i < VetInfo.size(); i++) { if (VetInfo[i].PlayerName == Get_Player_Name_By_ID(ID)) { int cvp, now; cvp = VetInfo[i].VeteranPoints; now = number + cvp; VetInfo[i].VeteranPoints = now; int Team; Team = Get_Team(ID); if (cvp < 100 && now >= 100) { char Promote[255]; sprintf(Promote,"msg Veteran: %s just got promoted to the rank of General", Get_Player_Name_By_ID(ID)); Console_Input(Promote); if (Team == 0) { sprintf(Promote, "ppage %d Kane has recognised your vision, you have been promoted to General, enjoy the extra 45HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("bonus_complete.wav"); } else { sprintf(Promote, "ppage %d Locke himself has promoted you to a General, enjoy the extra 45HP armor on all NEW characters", ID); Commands->Create_2D_WAV_Sound("bonus_complete.wav"); } Console_Input(Promote); } else if (cvp < 60 && now >= 60) { char Promote[255]; sprintf(Promote,"msg Veteran: %s just got promoted to the rank of Brigadier", Get_Player_Name_By_ID(ID)); Console_Input(Promote); if (Team == 0) { sprintf(Promote, "ppage %d The Brotherhood of Nod likes your style, you are …
creator: Gen_Blacky
date: 2007-12-04T00:09:55-00:00

Re: Veteran Plugin.
type: item
description: tbh, if someone came to me and asked for me to release it, I would have, but no that did not happen, instead what happened, 1 person said source plz and 2 other people did nothing but quote the first without adding anything to it and then they flame and have snipes at you because you never did what they wanted
creator: Hex
date: 2007-12-04T00:47:32-00:00

Re: Veteran Plugin.
type: item
description: Hex wrote on Tue, 04 December 2007 00:47 tbh, if someone came to me and asked for me to release it, I would have, but no that did not happen, instead what happened, 1 person said source plz and 2 other people did nothing but quote the first without adding anything to it and then they flame and have snipes at you because you never did what they wanted I've already explained what i meant by my comment, if that's aimed at me. If me and Reborn needed the source we probably would of asked you. We don't, though, since Reborn has written his own and I don't need it. We only wanted it out of interest, it's not worth pursuing. Me or Reborn may not of needed it, there are probably a lot of other people out there that would learn from your code and benefit from it.
creator: jnz
date: 2007-12-04T01:30:06-00:00

Re: Veteran Plugin.
type: item
description: Get_Wide_Player_Name_By_ID and Get_Wide_Player_Name do not need to be deleted. That's why they're used instead of the regular versions.
creator: Whitedragon
date: 2007-12-04T07:11:22-00:00

Re: Veteran Plugin.
type: item
description: Yes, Get_Wide_Player_Name doesn't need to be deleted. const char *Get_Player_Name_By_ID(int PlayerID) { cPlayer *x = FindPlayer(PlayerID); if (!x) { return 0; } return WideCharToChar(x->PlayerName); } const char *WideCharToChar(const wchar_t *wcs) { if (!wcs) { char *c = new char[2]; c[0] = 0; c[1] = 0; return c; } int length = wcslen(wcs); char *text = new char[length+1]; wcstombs(text,wcs,length+1); return text; }
creator: jnz
date: 2007-12-04T07:45:23-00:00

Re: Veteran Plugin.
type: item
description: Dan, not at all dude, I know you're more than capible of creating something fr more advanced, as said on MSN, I was talking in general on that post
creator: Hex
date: 2007-12-04T08:54:53-00:00

Re: Veteran Plugin.
type: item
description: I can actually see why Hex doesn't release it. It's the same reason why I don't release a couple of my creations. You don't want someone to rip your work and call it their own without giving proper credits to the original creator. ~MathK1LL
creator: Genesis2001
date: 2007-12-04T21:14:36-00:00

Re: Veteran Plugin.
type: item
description: Bah, what are they gonna do? Sell it for millions to EA? Pretty much every mod available today is only so because one guy released his stuff for the rest of us. You can keep the "renefame", I would much rather prefer a community that actually knew how to code and helped eachother. It would be awesome if I could make a post here with my problem and have it solved, or help on it. There is only about four or five people that I can actually talk to about coding and the renegade API and get a helpful answer. I would love for a community like farcry and crysis has.
creator: reborn
date: 2007-12-04T21:31:15-00:00

Re: Veteran Plugin.
type: item
description: The trouble is, C++ is hard
creator: cnc95fan
date: 2007-12-04T21:41:03-00:00

Re: Veteran Plugin.
type: item
description: Speaking from pure experience, MathKill, I have found that sharing and supporting your work with those around you actually yields far more positive and rewarding results. It building character, respect, and it makes it very easy to network with others around you who share a similar passion. It opens doors. C++ isn't that hard. There is a bit of a learning curve to get over at first, with learning the syntax rules of the language. But working in this environment is more of a specialized scripting language over pure C++ programming. With everything you need in the backyard, there is no need for you to venture out into the rest of the neighborhood, so don't concern yourself with it.
creator: vloktboky
date: 2007-12-04T22:19:32-00:00

Re: Veteran Plugin.
type: item
description: Well, its not that its hard(nvm what i said ) its more.. Where do I start? I don't want to do boring console commands featuring then plain and dull "Hello World" , wow, i know c++, i can cout << things...
creator: cnc95fan
date: 2007-12-04T22:23:00-00:00

Re: Veteran Plugin.
type: item
description: I'm not bothered about releasing code or people changing it, what annoys me is people that made snide comments because you don't. reborn wrote on Sat, 01 December 2007 06:55 The was a link to one spammed all over these forums Need I say more.
creator: Hex
date: 2007-12-04T22:43:48-00:00

Re: Veteran Plugin.
type: item
description: Just ignore those people, if someone makes an unconstructive, unhelpful post. Pretend it doesn't exist. If you know better yourself, why be put down by what someone else says? EDIT: @MathK1LL, if you found someone had ripped your code and passed it off as their own they will get found out, and quite easily. Then ridiculed by the community. Scrin? Matix? just some examples.
creator: jnz
date: 2007-12-04T23:32:29-00:00

Re: Veteran Plugin.
type: item
description: RoShamBo wrote on Tue, 04 December 2007 17:32 Just ignore those people, if someone makes an unconstructive, unhelpful post. Pretend it doesn't exist. If you know better yourself, why be put down by what someone else says? EDIT: @MathK1LL, if you found someone had ripped your code and passed it off as their own they will get found out, and quite easily. Then ridiculed by the community. Scrin? Matix? just some examples. So true. There's also the fact that Scrin is a cheater though, but Matix has DoSed people in the past so, yeah.
creator: Ethenal
date: 2007-12-04T23:48:17-00:00

Re: Veteran Plugin.
type: item
description: Hex wrote on Tue, 04 December 2007 17:43 I'm not bothered about releasing code or people changing it, what annoys me is people that made snide comments because you don't. reborn wrote on Sat, 01 December 2007 06:55 The was a link to one spammed all over these forums Need I say more. Well, I posted that after you removed the public links (or had them removed). Look, I think you have assumed me to be some self-rightous annoying butt-hole. I'm not trying to get on your tits. I believe that making your code available to everyone is a good thing. Seeing as how you've released the .dll I can't see the issue with releasing the source code. I don't want to make a big thing about it, and I don't want us to fall out over it. It's nice that you have released a plug-in for people to use. If you want to leave it at that then that's fine. You done a good thing. I believe you could do a better thing by releasing the source code too, but it's up to you. The plug-in you made seems to work great and I congratulate you on it. I would like to leave it on the note though that your plug-in would not exist today if it wasn't for someone else releasing there source. What you accomplished would not of been possible, or would of been allot harder, if it wasn't for someone else releasing there source code.
creator: reborn
date: 2007-12-05T00:00:41-00:00

Re: Veteran Plugin.
type: item
description: hey reborn about the vet system, i added your code and tried to compile it, but there were many errors. i got some help from roshambo with fixing some of the errors but at a moment roshambo said he needed the functions. i cant seem to find those? can you help on that? 1>gmmain.obj : error LNK2019: unresolved external symbol "bool __cdecl IsLowClassVehicle(char const *)" (?IsLowClassVehicle@@YA_NPBD@Z) referenced in function "private: virtual void __thiscall reb_vet_System_Vehicles::Custom(unsigned char *,int,int,unsigned char *)" (?Custom@reb_vet_System_Vehicles@@EAEXPAEHH0@Z) 1>gmscripts.obj : error LNK2019: unresolved external symbol "int __cdecl GetPoints(char const *)" (?GetPoints@@YAHPBD@Z) referenced in function "private: virtual void __thiscall MDB_SSGM_Player::Killed(unsigned char *,unsigned char *)" (?Killed@MDB_SSGM_Player@@EAEXPAE0@Z) 1>scripts.dll : fatal error LNK1120: 2 unresolved externals
creator: wittebolx
date: 2008-01-02T17:26:02-00:00

Re: Veteran Plugin.
type: item
description: IsLowClassVehicle GetPoints are missing
creator: jnz
date: 2008-01-02T17:37:00-00:00

Re: Veteran Plugin.
type: item
description: RoShamBo wrote on Wed, 02 January 2008 12:37 IsLowClassVehicle GetPoints are missing I forgot about those... int GetPoints(const char* Preset) { int VetWorth = 0; if (stricmp(Preset,"CnC_GDI_Engineer_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_GDI_Engineer_2SF") == 0) VetWorth = 3; else if (stricmp(Preset,"CnC_GDI_Grenadier_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_GDI_Grenadier_2SF") == 0) VetWorth = 2; else if (strstr(Preset,"CnC_Ignatio_Mobius")) VetWorth = 3; else if (stricmp(Preset,"CnC_GDI_MiniGunner_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_GDI_MiniGunner_1Off") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_GDI_MiniGunner_2SF") == 0) VetWorth = 2; else if (strstr(Preset,"CnC_GDI_MiniGunner_3Boss")) VetWorth = 3; else if (stricmp(Preset,"CnC_GDI_RocketSoldier_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_GDI_RocketSoldier_1Off") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_GDI_RocketSoldier_2SF") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_Nod_Engineer_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_Nod_FlameThrower_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_Nod_FlameThrower_1Off") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_Nod_FlameThrower_2SF") == 0) VetWorth = 2; else if (strstr(Preset,"CnC_Nod_FlameThrower_3Boss")) VetWorth = 3; else if (stricmp(Preset,"CnC_Nod_Minigunner_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_Nod_Minigunner_1Off") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_Nod_Minigunner_2SF") == 0) VetWorth = 2; else if (strstr(Preset,"CnC_Nod_Minigunner_3Boss")) VetWorth = 3; else if (strstr(Preset,"CnC_Nod_MiniGunner_3Boss")) VetWorth = 3; else if (stricmp(Preset,"CnC_Nod_RocketSoldier_0") == 0) VetWorth = 1; else if (stricmp(Preset,"CnC_Nod_RocketSoldier_1Off") == 0) VetWorth = 2; else if (stricmp(Preset,"CnC_Nod_RocketSoldier_2SF") == 0) VetWorth = 2; else if (strstr(Preset,"CnC_Nod_RocketSoldier_3Boss")) VetWorth = 3; else if (stricmp(Preset,"CnC_Nod_Technicia…
creator: reborn
date: 2008-01-03T17:14:33-00:00

Re: Veteran Plugin.
type: item
description: Ah, there they are. Thanks Reborn.
creator: jnz
date: 2008-01-03T20:35:12-00:00

Re: Veteran Plugin.
type: item
description: No worries, can't unerstand how I over-looked including them to be honest.
creator: reborn
date: 2008-01-04T07:19:52-00:00

Re: Veteran Plugin.
type: item
description: THX Reborn. i got it compiled now and it works great!
creator: wittebolx
date: 2008-01-05T11:27:19-00:00

Re: Veteran Plugin.
type: item
description: it didnt work so well for me :S here is what it told me ever so violently ------ Build started: Project: SSGM, Configuration: Debug Win32 ------ Compiling... gmscripts.cpp .\gmscripts.cpp(46) : error C2220: warning treated as error - no 'object' file generated .\gmscripts.cpp(46) : warning C4018: '<' : signed/unsigned mismatch .\gmscripts.cpp(105) : warning C4018: '<' : signed/unsigned mismatch .\gmscripts.cpp(118) : warning C4018: '<' : signed/unsigned mismatch .\gmscripts.cpp(144) : error C2601: 'IsLowClassVehicle' : local function definitions are illegal .\gmscripts.cpp(136): this line contains a '{' which has not yet been matched .\gmscripts.cpp(144) : fatal error C1903: unable to recover from previous error(s); stopping compilation gmmain.cpp .\gmmain.cpp(812) : error C3861: 'VetAddPlayer': identifier not found .\gmmain.cpp(990) : error C3861: 'VetClearPlayers': identifier not found Generating Code... Creating browse information file... Microsoft Browse Information Maintenance Utility Version 8.00.50727 Copyright (C) Microsoft Corporation. All rights reserved. BSCMAKE: error BK1506 : cannot open file '.\tmp\scripts\debug\gmscripts.sbr': No such file or directory Build log was saved at "file://f:\DarkWorld C&C C++\SSGM Source\tmp\scripts\debug\BuildLog.htm" SSGM - 6 error(s), 3 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
creator: Darknes2
date: 2008-03-08T15:39:03-00:00

Re: Veteran Plugin.
type: item
description: #pragma warning(disable: 4996) I'd need to see the code to fix the other errors.
creator: jnz
date: 2008-03-08T16:05:40-00:00

Re: Veteran Plugin.
type: item
description: i have this at the top of gmscripts.cpp /* Renegade Scripts.dll SSGM scripts Copyright 2007 Vloktboky, Whitedragon(MDB), Mac, Jonathan Wilson This file is part of the Renegade scripts.dll The Renegade scripts.dll is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. See the file COPYING for more details. In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence. Only the source code to the module(s) containing the licenced code has to be released. */ #include "scripts.h" #include "engine.h" #include "gmmain.h" #include "gmscripts.h" #include <iostream> #pragma warning(disable: 4996) //Fix for the double created event bug when attaching scripts in the level loaded hook. MDB_SSGM_Base::MDB_SSGM_Base() { WasCreated = false; } void MDB_SSGM_Base::Created(GameObject *obj) { if (!WasCreated) { NewCreated(obj); WasCreated = true; } } //****************************************************************************** //****************************************************************************** //******************************* veteran STUFF ******************************** struct veteranPlayers { std::string PlayerName; int veteranPoints; }; std::vector<veteranPlayers> VetInfo; void VetUpdate(int ID, int number, int score) { if (!VetInfo.empty()) { for (int i = 0; i < VetInfo.size(); i++) { if (VetInfo[i].PlayerName == Get_Player_Name_By_ID(ID)) { int cvp, now; cvp = VetInfo[i].veteranPoints; now = number + cvp; VetInfo[i].veteranPoints = now; int Team; Team = Get_Team(ID); if (cvp < 100 && now >= 100) { char Promote[255]; sprintf(Promote,"msg veteran: %s just got promoted to the rank of General", Get_Player_Name_By_ID(ID)); Console_Input(Promote); if (Team == 0) { sprintf(Promote, "ppage %d Kane has recognised your…
creator: Darknes2
date: 2008-03-08T16:22:00-00:00

Re: Veteran Plugin.
type: item
description: I totally agree with Reborn. For ages now it seems that there is a combat between the Server Admins. Everyone of them wants to have the best & new enhancements instead of providing unique Servers with different gameplay. A quick example: The CCTF mod. I wanted to have it in 2005/2006. Everybody has kept it private, so I asked TGpaddy (TG changed to SoD later FYI). He refused to send it to me. And guess what? I created my own CCTF mod which differed from all other crazy mods. For the Vetplugin I believe BC had this first. I don't know if I am right, but I saw it first on BCserv4 (the AOW) years ago. I mean, it's easier to make a modified objects than writing scripts from scratch. So no wondering why people often want to have the finished files and only a few skilled do modify them for their own needs. So again, I think this is a Community and people should share their work. I for my self do it this way.
creator: EA-DamageEverything
date: 2008-03-08T20:09:46-00:00

Re: Veteran Plugin.
type: item
description: whats wrong with this!!!! for (int i = 0; i < VetInfo.size(); ++i) { it says this .\gmscripts.cpp(48) : warning C4018: '<' : signed/unsigned mismatch
creator: Darknes2
date: 2008-03-08T21:22:41-00:00

Re: Veteran Plugin.
type: item
description: Quote: So again, I think this is a Community and people should share their work. I for my self do it this way. Revoke the a00 shit and i will share my work.
creator: cAmpa
date: 2008-03-08T22:25:46-00:00

Re: Veteran Plugin.
type: item
description: Darknes2 wrote on Sat, 08 March 2008 15:22 for (unsigned int i = 0; i < VetInfo.size(); ++i) {
creator: saberhawk
date: 2008-03-08T23:03:12-00:00

Re: Veteran Plugin.
type: item
description: ok well i got THAT fixed now 1 last thing... the on player join and gameover hooks are in gmmain and the rest of the vet code is in gmscripts .... and it wont let me put the addvetplayer and clearvetplayers things to them because of that.. so how do i make it work?
creator: Darknes2
date: 2008-03-09T04:25:30-00:00

Re: Veteran Plugin.
type: item
description: Just declare the function in the second file. Like void function1(int lol) { dostuff();} in file1, and then void function1(int lol); in file2.
creator: saberhawk
date: 2008-03-09T07:30:41-00:00

Re: Veteran Plugin.
type: item
description: Hmm... Where is problem? Error 1 error C2220: warning treated as error - no 'object' file generated c:\ExScripts\SSGM Source\gmscripts.cpp 104 Warning 2 warning C4018: '<' : signed/unsigned mismatch c:\ExScripts\SSGM Source\gmscripts.cpp 104 Warning 3 warning C4018: '<' : signed/unsigned mismatch c:\ExScripts\SSGM Source\gmscripts.cpp 117 Error 4 error C2601: 'IsLowClassVehicle' : local function definitions are illegal c:\ExScripts\SSGM Source\gmscripts.cpp 143 Error 5 error C2601: 'GetPoints' : local function definitions are illegal c:\ExScripts\SSGM Source\gmscripts.cpp 158 Error 6 error C2653: 'reb_vet_System' : is not a class or namespace name c:\ExScripts\SSGM Source\gmscripts.cpp 215 Error 7 error C2065: 'Level' : undeclared identifier c:\ExScripts\SSGM Source\gmscripts.cpp 219 Error 8 error C2065: 'IconID' : undeclared identifier c:\ExScripts\SSGM Source\gmscripts.cpp 223 Error 9 error C2673: 'Created' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 229 Error 10 error C2673: 'Created' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 265 Error 11 error C2653: 'reb_vet_System' : is not a class or namespace name c:\ExScripts\SSGM Source\gmscripts.cpp 268 Error 12 error C2673: 'Custom' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 312 Error 13 error C2653: 'reb_vet_System' : is not a class or namespace name c:\ExScripts\SSGM Source\gmscripts.cpp 318 Error 14 error C2673: 'Timer_Expired' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 321 Error 15 error C2065: 'ID' : undeclared identifier c:\ExScripts\SSGM Source\gmscripts.cpp 329 Error 16 error C2673: 'Timer_Expired' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 336 Error 17 error C2673: 'Timer_Expired' : global functions do not have 'this' pointers c:\ExScripts\SSGM Source\gmscripts.cpp 360 Error 18 error C2653: 'reb_vet_S…
creator: ExEric3
date: 2008-05-10T11:43:05-00:00

Re: Veteran Plugin.
type: item
description: error C2653: 'reb_vet_System' : is not a class or namespace name c:\ExScripts\SSGM Source\gmscripts.cpp 215 = paste the whole script into the gmmain.cpp and the class into gmmain.h, this could/should help. I do it this way and everything works. -------- error C2601: 'GetPoints' : local function definitions are illegal c:\ExScripts\SSGM Source\gmscripts.cpp = Get_Points would be a valid scripts command. Over all, the whole code should be placed in one file. You cannot split Reborns' main code because the gmmain.cpp has zero access to the gmscripts.cpp if I am interpreting the include-Syntax right. In the other way, the gmscripts can read gmmain, gmcrate etc. I probably fail with this post, but I do think it goes in the right direction.
creator: EA-DamageEverything
date: 2008-05-12T02:04:40-00:00

Re: Veteran Plugin.
type: item
description: Send me your solution and I will fix it.
creator: reborn
date: 2008-05-12T09:38:27-00:00

Re: Veteran Plugin.
type: item
description: OK. When I come at home I send you pm. Thanks
creator: ExEric3
date: 2008-05-12T10:15:16-00:00

Re: Veteran Plugin.
type: item
description: Fixed, check your PM's. C++ is case sensitive, GetPoints is not the same as getPoints. Most errors seemed to be case sensitive issues.
creator: reborn
date: 2008-05-12T23:20:03-00:00

Re: Veteran Plugin.
type: item
description: reborn wrote on Tue, 13 May 2008 01:20 Fixed, check your PM's. C++ is case sensitive, GetPoints is not the same as getPoints. Most errors seemed to be case sensitive issues. Thanks.
creator: ExEric3
date: 2008-05-13T04:51:35-00:00

Re: Veteran Plugin.
type: item
description: hey can some1 please give me a Vet plugin for NR... ive checked evry where but cannot find it
creator: nodmanmik
date: 2008-05-18T00:14:39-00:00

Re: Veteran Plugin.
type: item
description: NR doesnt have a Vet system. as reborn explained, this is a c++ script, so just add the script into SSGM Source and compile it. if yoru not sure how to add those scripts then ask on the DCOM forum. http://forums.dcomproductions.net/viewforum.php?f=46 good luck
creator: wittebolx
date: 2008-05-18T11:04:25-00:00

Re: Veteran Plugin.
type: item
description: lol good luck ... yea im gonna need it bad haha! i know nothing about scripting...
creator: nodmanmik
date: 2008-05-18T12:59:28-00:00

Re: Veteran Plugin.
type: item
description: nodmanmik wrote on Sun, 18 May 2008 14:59 i know nothing about scripting... I think it's time to learn it...
creator: ExEric3
date: 2008-05-18T15:22:54-00:00

Re: Veteran Plugin.
type: item
description: lol so do i... how can i learn? a website? ... hehe
creator: nodmanmik
date: 2008-05-19T12:22:22-00:00

Re: Veteran Plugin.
type: item
description: Buy this book: http://www.amazon.co.uk/C%2B%2B-Without-Fear-Beginners-Guide/dp/0321246950/ref=s r_1_1?ie=UTF8&s=books&qid=1211201251&sr=8-1 I have quite allot of books on C++, for me, this was the best book for learning it at an introductory level. I should of started with this book first, instead I got half way through C++ for dummies and regretted ever buying it. The one I linked to is very affordable and a great way to start learning. Buy it. Read it. Learn it. Love it.
creator: reborn
date: 2008-05-19T12:50:03-00:00

Re: Veteran Plugin.
type: item
description: That's the book I used to learn C++... Thanks, Zack
creator: Genesis2001
date: 2008-05-19T15:53:46-00:00

Re: Veteran Plugin.
type: item
description: nodmanmik wrote on Mon, 19 May 2008 14:22 lol so do i... how can i learn? a website? ... hehe For example. Books, websites, friends etc... I also dont know C++ and when I have some problems Im trying to fix it or ask someone for help. But this is gonna off topic.
creator: ExEric3
date: 2008-05-20T05:43:37-00:00

Re: Veteran Plugin.
type: item
description: thats ok... ty for the advice people..
creator: nodmanmik
date: 2008-05-20T08:43:38-00:00

Re: Veteran Plugin.
type: item
description: www.learncpp.com is the path I took, along with C++ for dummies. However, I already had some experience in C. I've done no Renegade scripting, but from the looks of it, scripting is very template driven and object-oriented.
creator: slavik262
date: 2008-05-21T00:59:42-00:00

Re: Veteran Plugin.
type: item
description: hrm... ill look up on it! thanks people for helping!
creator: nodmanmik
date: 2008-05-21T11:42:33-00:00

Re: Veteran Plugin.
type: item
description: I decided to upgrade the veteran system that I posted here to use in cnc_reborn. I changed it so that it rewards players for healing/repairing and disarming. I also added some little notices for players too, these notices will only be displayed for people using the upgraded client scripts.dll, but for cnc_reborn that's fine. Here is the changes I made. struct RepPlayers { std::string RepPlayerName; int RepPoints; }; std::vector<RepPlayers> RepInfo; void RepUpdate(int ID, int number) { if (!RepInfo.empty()) { for (int i = 0; i < RepInfo.size(); i++) { if (RepInfo[i].RepPlayerName == Get_Player_Name_By_ID(ID)) { int cvp, now; cvp = RepInfo[i].RepPoints; now = number + cvp; RepInfo[i].RepPoints = now; if (cvp < 200 && now >= 200) { VetUpdate(ID, 1, Commands->Get_Points(Get_GameObj(ID))); Display_Int_Player(Get_GameObj(ID),1,"Bonus repairing veteran points gained: 1"); RepInfo[i].RepPoints = 0; now = 0; cvp = 0; } break; } } } } int RepCheckPoints(int ID) { if (!RepInfo.empty()) { for (int i = 0; i < RepInfo.size(); i++) { if (RepInfo[i].RepPlayerName == Get_Player_Name_By_ID(ID)) { int Points; Points = RepInfo[i].RepPoints; return Points; } } } return 0; } bool RepCheck(int ID) { if (!RepInfo.empty()) { for (int i = 0; i < RepInfo.size(); i++) { if (RepInfo[i].RepPlayerName == Get_Player_Name_By_ID(ID)) { return true; } } } return false; } void RepAddPlayer(int ID) { if (RepCheck(ID) == false) { RepPlayers temp; temp.RepPlayerName = Get_Player_Name_By_ID(ID); temp.RepPoints = 0; RepInfo.push_back(temp); } } void RepClearPlayers() { RepInfo.erase(RepInfo.begin(), RepInfo.end()); int Players = The_Game()->MaxPlayers; for (int i = 1; i <= Players; i++) { if (Get_GameObj(i)) { RepAddPlayer(i); } } } Then on the ::Damaged events for the vehicles, players and buildings I did the following: void MDB_SSGM_Vehicle::Damaged(GameObject *obj, GameObject *damager, float damage) { if(damage < 0){ if (Commands->Is_A_Star(damager) && Commands->Get_Player_Type(damager) == Commands->Get…
creator: reborn
date: 2008-05-24T14:44:54-00:00

Re: Veteran Plugin.
type: item
description: Ehm. Could you tell me to which files I must add it?
creator: ExEric3
date: 2008-05-24T14:49:35-00:00

Re: Veteran Plugin.
type: item
description: reborn wrote on Sat, 24 May 2008 15:44 Also, my maths seems to be fading away from me... There must be a better way to turn a negative number into a positive number, rather then "(damage - damage) - damage)". #include <cstdlib> abs(number); or, for floating point numbers #include <cmath> fabs(number); Or, if you already know for sure the number is negative; int number = -number;
creator: danpaul88
date: 2008-05-24T15:36:42-00:00

Re: Veteran Plugin.
type: item
description: danpaul88 wrote on Sat, 24 May 2008 11:36 reborn wrote on Sat, 24 May 2008 15:44 Also, my maths seems to be fading away from me... There must be a better way to turn a negative number into a positive number, rather then "(damage - damage) - damage)". Or, if you already know for sure the number is negative; int number = -number; Thanks DP
creator: reborn
date: 2008-05-24T18:15:42-00:00

Re: Veteran Plugin.
type: item
description: not many people can make fun of your code reborn it seems to me like you have coded half the modded servers ive played one example hunt the player (mvrtech) awesome idea that no one else has had
creator: lonleyppl
date: 2008-05-25T22:37:48-00:00

Re: Veteran Plugin.
type: item
description: reborn wrote on Tue, 04 December 2007 18:00 I believe that making your code available to everyone is a good thing. well then release all the source for C&C Reborn.
creator: halo2pac
date: 2008-06-01T06:41:31-00:00

Re: Veteran Plugin.
type: item
description: I will be. Why wouldn't I?
creator: reborn
date: 2008-06-01T11:06:12-00:00

Re: Veteran Plugin.
type: item
description: Including the DLL source?
creator: halo2pac
date: 2008-06-01T23:17:33-00:00

Re: Veteran Plugin.
type: item
description: I'll be releasing the code that runs on the official server and the compiled scripts.dll, which is based on SSGM. I don't understand why you think I wouldn't :-/ This is getting rather off-topic though.
creator: reborn
date: 2008-06-02T00:36:58-00:00

Re: Veteran Plugin.
type: item
description: is there a way to make the levels infinite? and the reward increase based on the level?
creator: halo2pac
date: 2008-06-03T00:20:55-00:00

Re: Veteran Plugin.
type: item
description: Yeah, that's possible. You could make the reward directly proportionate to the veteran level itself or the veteran points they have. I'll throw something together...
creator: reborn
date: 2008-06-03T06:37:31-00:00

Re: Veteran Plugin.
type: item
description: Thanks much. A couple of things though. does it read from an ini to get settings? and if so for the names of the levels is it possible to make them read the names from a list and for a level like 50 if you have no name it just displays "promoted to level 50". and I really suck @ c++, best I ever did was modify what you get in the crates. could you compile it for me? thanks.
creator: halo2pac
date: 2008-06-05T18:10:23-00:00

Re: Veteran Plugin.
type: item
description: EA-DamageEverything wrote on Sun, 11 May 2008 22:04 error C2653: 'reb_vet_System' : is not a class or namespace name c:\ExScripts\SSGM Source\gmscripts.cpp 215 = paste the whole script into the gmmain.cpp and the class into gmmain.h, this could/should help. I do it this way and everything works. -------- error C2601: 'GetPoints' : local function definitions are illegal c:\ExScripts\SSGM Source\gmscripts.cpp = Get_Points would be a valid scripts command. Over all, the whole code should be placed in one file. You cannot split Reborns' main code because the gmmain.cpp has zero access to the gmscripts.cpp if I am interpreting the include-Syntax right. In the other way, the gmscripts can read gmmain, gmcrate etc. I probably fail with this post, but I do think it goes in the right direction. Ok, ive copied and pasted the whole script into the gmmain.cpp and class into gmmain.h but i got 45 errors/warnings Here they are HERE!!!! ------ Build started: Project: SSGM, Configuration: Debug Win32 ------ Compiling... gmmain.cpp .\gmmain.cpp(1466) : error C2220: warning treated as error - no 'object' file generated .\gmmain.cpp(1466) : warning C4018: '<' : signed/unsigned mismatch .\gmmain.cpp(1525) : warning C4018: '<' : signed/unsigned mismatch .\gmmain.cpp(1538) : warning C4018: '<' : signed/unsigned mismatch .\gmmain.cpp(1735) : warning C4805: '==' : unsafe mix of type ''unknown-type'' and type 'bool' in operation .\gmmain.cpp(1735) : error C3861: 'IsLowClassVehicle': identifier not found .\gmmain.cpp(1746) : warning C4805: '==' : unsafe mix of type ''unknown-type'' and type 'bool' in operation .\gmmain.cpp(1746) : error C3861: 'IsLowClassVehicle': identifier not found .\gmmain.cpp(1759) : warning C4805: '==' : unsafe mix of type ''unknown-type'' and type 'bool' in operation .\gmmain.cpp(1759) : error C3861: 'IsLowClassVehicle': identifier not found .\gmmain.cpp(1772) : warning C4805: '==' : unsafe mix of type ''unknown-type'' and type 'bool' in operation .\gmmain.cpp(1772) :…
creator: HeavyX101- Left
date: 2008-06-13T02:16:59-00:00

Re: Veteran Plugin.
type: item
description: I think it would be good if you knew and understood the code rather than just copy and paste everything reborn puts up here. You should check where you pasted the code, because you may have stuffed them into another method/function instead of in a blank space.
creator: nopol10
date: 2008-06-13T02:20:11-00:00

Re: Veteran Plugin.
type: item
description: I know where every thing goes. Most of the other commands are working. But when i tried doing this one, i had alot of errors. So i just read most of the replies and found this one and said that it might work. But it seems not to.
creator: HeavyX101- Left
date: 2008-06-13T02:35:49-00:00

Re: Veteran Plugin.
type: item
description: You're missing some functions, and your compiler is complaining about some warnings that in this instance do not really matter. You're also missing at least one global variable, and I'm pretty sure you've either renamed some mdb scripts, or you've accidently missed a semi-colon or something.
creator: reborn
date: 2008-06-13T10:21:28-00:00

Re: Veteran Plugin.
type: item
description: can you tell me where everything goes. does every thing just go in gmmain
creator: Gen_Blacky
date: 2008-06-15T07:58:43-00:00

Re: Veteran Plugin.
type: item
description: Me personally, I put it all in gmmain.cpp, and migrated the mdb_ and ssgm scripts I altered into there too.
creator: reborn
date: 2008-06-15T09:53:44-00:00

Re: Veteran Plugin.
type: item
description: What did i do worng 0_o gmmain errors 1>gmmain.cpp 1>.\gmmain.cpp(697) : error C3861: 'VetAddPlayer': identifier not found 1>.\gmmain.cpp(845) : error C3861: 'VetClearPlayers': identifier not found 1>.\gmmain.cpp(848) : error C2086: 'char ObjectsType[10]' : redefinition 1> .\gmmain.cpp(846) : see declaration of 'ObjectsType' 1>.\gmmain.cpp(848) : error C2086: 'char ObjectsType2[10]' : redefinition 1> .\gmmain.cpp(846) : see declaration of 'ObjectsType2' 1>.\gmmain.cpp(848) : error C2086: 'char ObjectsFile[20]' : redefinition 1> .\gmmain.cpp(846) : see declaration of 'ObjectsFile' 1>.\gmmain.cpp(2404) : warning C4018: '<' : signed/unsigned mismatch 1>.\gmmain.cpp(2463) : warning C4018: '<' : signed/unsigned mismatch 1>.\gmmain.cpp(2476) : warning C4018: '<' : signed/unsigned mismatch 1>.\gmmain.cpp(2485) : error C2365: 'VetAddPlayer' : redefinition; previous definition was 'formerly unknown identifier' 1>.\gmmain.cpp(2494) : error C2365: 'VetClearPlayers' : redefinition; previous definition was 'formerly unknown identifier' 1>.\gmmain.cpp(2499) : error C3861: 'VetAddPlayer': identifier not found 1>.\gmmain.cpp(2781) : warning C4018: '<' : signed/unsigned mismatch 1>SSGM - 8 error(s), 4 warning(s) gmscripts errors 1>Compiling... 1>gmscripts.cpp 1>.\gmscripts.cpp(336) : error C3861: 'VetUpdate': identifier not found 1>.\gmscripts.cpp(336) : error C3861: 'GetPoints': identifier not found 1>.\gmscripts.cpp(1664) : error C3861: 'VetUpdate': identifier not found 1>SSGM - 3 error(s), 0 warning(s) missing somthing in the h file for gmscripts ?
creator: Gen_Blacky
date: 2008-06-16T00:46:43-00:00

Re: Veteran Plugin.
type: item
description: You've not moved all the scripts that call those functions into the same .cpp file. I moved them all into gmmain.cpp.
creator: reborn
date: 2008-06-16T04:46:32-00:00