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

Scripts Part 3
type: item
description: this is kind abig umm can someone help me make a script where u do a command and it builds or buys somthing? like buy a weapon tank or agt or somthing ? i have no clue of how to do it so maybe can someoen help and make one with me?
creator: _SSnipe_
date: 2007-06-16T05:57:07-00:00

Re: Scripts Part 3
type: item
description: renhelp.net go to the poke and buy tutorial
creator: Veyrdite
date: 2007-06-16T07:03:25-00:00

Re: Scripts Part 3
type: item
description: He means something different to that.. He wants to be able to say something in-game like "!buy med" and it drops off a med tank to him, or "!gt" and it places a Mini guard tower for him. This is possible by modifying the existing chat hook in SSAOW, to find the chat hook search for this bit: const char *WideCharToChar(const wchar_t *wcs); void Chat(int ID, int Type, const wchar_t *Msg) { Then you will have to have it catch your desired chat, I would just add this to the end of the existing code, so say you want to have it catch the word "!build_turret" then it will look something like this at the end of the chat hook: else if ((stricmp(Msg2, "!Turret") == 0)) Pos = Commands->Get_Position(obj); Vector3 Pos.Z += 0; GameObject *turret = Commands->Create_Object(team==0?"Nod_Turret_MP":"Nod_Turret_MP_Improved",Pos); Commands->Disable_Physical_Collisions(turret); if (team == 1) Commands->Set_Player_Type(turret,1); } } but you must remember to declare the actual player as the object to get the position, so the beginning will look something like: const char *WideCharToChar(const wchar_t *wcs); void Chat(int ID, int Type, const wchar_t *Msg) { GameObject *obj = Get_GameObj(ID); int team = Commands->Get_Player_Type(obj); if (Type == 2) return; This would most likely not compile even if you added it to the right places, I don't have the time really to adapt the code to suit SSAOW 1.5, although the only problem will most likely be with the vector3 stuff, as it changed after version 1.5 in the engine.cpp file I think. But it will give you a good idea of how to go about creating your own version. If you wanted a cost involved you would have to add that too, I would also suggest adding a limit to them too. Hope that helps you get a good start =]
creator: reborn
date: 2007-06-16T12:53:30-00:00

Re: Scripts Part 3
type: item
description: hmm ok ty a lot and how about price i wondering about that hahhaaha and what i image is jsut buy any vech that comes out of wf or air and buy turret and gt which u have and any char u turn into on the spot srry lol im just looking at those codes trying to make heads or tails but i acutclly understand some!!! when i get home later i will add them codes woot!
creator: _SSnipe_
date: 2007-06-16T17:58:13-00:00

Re: Scripts Part 3
type: item
description: I suppose you got this idea from kam. I see about 4 other servers using the same idea already. Kamuix's Server is probably the most popular. When everyone starts doing the same thing, like this for example, it ruins the idea. Maybe you should try and do new things instead, because the idea is already widely used, and you probably wouldn't get very far with this script.
creator: BlueThen
date: 2007-06-16T18:07:15-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Sat, 16 June 2007 13:58 hmm ok ty a lot and how about price i wondering about that hahhaaha and what i image is jsut buy any vech that comes out of wf or air and buy turret and gt which u have and any char u turn into on the spot srry lol im just looking at those codes trying to make heads or tails but i acutclly understand some!!! when i get home later i will add them codes woot! To make it cost something then add "Commands->Give_Money(obj,2000*-1.0f,false);", i would add it just after the turret is created. What that line basically says is: give this amount to the player that said "!turret" (2000 times -1). So it will actually give them -2000 credits. To change the cost just change "2000". I really don't have time right now to explain how to do the rest. But you should be able to look at the random character crate and see how that changes a player, then adapt the same method I showed you for "!turret" to suit say "!buy_mobius".
creator: reborn
date: 2007-06-16T19:42:51-00:00

Re: Scripts Part 3
type: item
description: i know kam has this im not going to get all crazy with it jsut a few things its mostly the weapon and char changed im into another question i looked at random char crate and cant make heads or tails but how can i make it so when u crab a POWERUP changes u into a char?
creator: _SSnipe_
date: 2007-06-16T21:07:12-00:00

Re: Scripts Part 3
type: item
description: If it was me I would write a small scripts, something like "void joe_change_char::created(GameObject *obj)" Which baiscally just done "Change_Character(obj,"presetnamehere");", then when the player picks up the pow just use the "Commands->Attach_Script" command to attach "joe_change_char". Infact I think that's a pretty dam nice way of doing it. When I said look at the random char crate I though you would pick up on the "Change_Character" command.
creator: reborn
date: 2007-06-16T23:16:01-00:00

Re: Scripts Part 3
type: item
description: cool i got another thing i neeed to know a script or find it where if u have a wepaon of a type u cant pick up any other powerup so like if u pick up a laser rilfe in a backpac u cant pick any other pack up with that same weapon i think i said this before soemwhere else 2 hmm
creator: _SSnipe_
date: 2007-06-17T00:24:58-00:00

Re: Scripts Part 3
type: item
description: Yeah you did mention it before, I think I replied something like: Create a script like "void joe_disable_pickup::created(GameObject *obj)" which would have to stop players from picking up new weapons, or perhaps clear there weapon when they do pick a new one up and just re grant the olb one or something. Then attach that script to the player when they pick up the first pow.
creator: reborn
date: 2007-06-17T00:34:59-00:00

Re: Scripts Part 3
type: item
description: ok well i want the weapon to be a laser rifle so onc eu get that u cant pick up anymore powerups that have laser rifle so can u make that scirtp and how do i add it >.<
creator: _SSnipe_
date: 2007-06-17T01:15:40-00:00

Re: Scripts Part 3
type: item
description: So when you pick up a laser rifle spawn you want them to not be able to pick up any more weapons at all?
creator: reborn
date: 2007-06-17T01:37:11-00:00

Re: Scripts Part 3
type: item
description: no its like if u pick of a powerup thats has a laser rifle u cant pick up any other powerup that has that laser rifle if u got a laser rifle from the crate or weapon spawn u still cant pick up a powerup its like no matter how u got that laser rifle if u got it u cant pick up a powerup if u want lets make it more easy ok.......ummm....if u have a laser rifle u cant pick up any other powerup if it contains another laser rifle OR POW_Medal_Health understand :S
creator: _SSnipe_
date: 2007-06-17T04:25:54-00:00

Re: Scripts Part 3
type: item
description: also among that script were making how can i add in the random char crate in the source files to be able to pick mutants aswell i just add there names in there?
creator: _SSnipe_
date: 2007-06-17T04:59:27-00:00

Re: Scripts Part 3
type: item
description: Just so we're clear, I am not making this for you. I am unsure if it is possible to do what you want to do with the power ups, I am unsure whether it is possible or not to just have a dude walk through it and nothing happen at all. It would be possible however to respawn it immediately if there was a boolean set or something on the plater to disallow grants after he has picked up the laser rifle. That would be the direction I took... The mutant thing, I am surprised you haven't been able to work it out for yourself. I mean you have the code right in front of you, you really shoul of been able to figure it out. { "Mutant", "CnC_GDI_Mutant_0_Mutant" } Anyhow, I think if I keep helping you, then you will never learn anything by yourself. And to be honest you are getting more and more lazy and selfish. Asking someone to pretty much do your mod for you isn't cool man. Asking questions is fine, but just asking "what are teh codes?!?!?! and where to add?!?!?!" just isn't really what this forums is all about. You really need to be applying what you have learned from one thing to another and try yourself instead of asking all the time.
creator: reborn
date: 2007-06-17T11:20:42-00:00

Re: Scripts Part 3
type: item
creator: crazfulla
date: 2007-06-17T13:20:54-00:00

Re: Scripts Part 3
type: item
description: crazfulla wrote on Sun, 17 June 2007 08:20 LOL
creator: BlueThen
date: 2007-06-17T13:29:01-00:00

Re: Scripts Part 3
type: item
description: Wow- thats pretty good crazfulla. 10 points.
creator: Sn1per74*
date: 2007-06-17T13:48:43-00:00

Re: Scripts Part 3
type: item
description: well i really dont know where to add a code once someones gives it to me,,,,,,,, also i still cant egt random char to choose other chars i added >.<' and trust me reborn i knew how to add the mutant part i just had to make sure and dont worry i am learning and the laser thing is possible iv seen it on the server i play on but idk how lol
creator: _SSnipe_
date: 2007-06-17T17:29:21-00:00

Re: Scripts Part 3
type: item
description: EDIT: NVM is there any tuts of how to laern c++ for ren?
creator: _SSnipe_
date: 2007-06-17T19:16:11-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Sun, 17 June 2007 15:16 EDIT: NVM is there any tuts of how to laern c++ for ren? That I am aware of there are no coding tutorials or learning sites for c++ with renegade in mind specifically. Your best bet is to look at the source code to the present and past SSAOW source code releases and DA releases too.
creator: reborn
date: 2007-06-17T21:50:36-00:00

Re: Scripts Part 3
type: item
description: ok reborn i still ahve problems i have put it chars in the random char section and does nto work i set there for hours picking up crates and nothing char *RandomGDIChar[14][2] = { { "Officer", "CnC_GDI_MiniGunner_1Off" }, { "Rocket Soldier", "CnC_GDI_RocketSoldier_1Off" }, { "Sydney", "CnC_Sydney" }, { "Deadeye", "CnC_GDI_MiniGunner_2SF" }, { "Gunner", "CnC_GDI_RocketSoldier_2SF" }, { "Patch", "CnC_GDI_Grenadier_2SF" }, { "Havoc", "CnC_GDI_MiniGunner_3Boss" }, { "Prototype Sydney", "CnC_Sydney_PowerSuit" }, { "Mobius", "CnC_Ignatio_Mobius" }, { "Hotwire", "CnC_GDI_Engineer_2SF" }, { "Mutant", "CnC_GDI_Mutant_0_Mutant" }, { "Acolyte", "CnC_GDI_Mutant_1Off_Acolyte" }, { "Templar", "CnC_GDI_Mutant_2SF_Templar" }, { "Locke", "GDI_Brigadier_Locke" } }; char *RandomNodChar[14][2] = { { "Officer", "CnC_Nod_Minigunner_1Off" }, { "Rocket Soldier", "CnC_Nod_RocketSoldier_1Off" }, { "Chem Warrior", "CnC_Nod_FlameThrower_1Off" }, { "Blackhand Sniper", "CnC_Nod_Minigunner_2SF" }, { "Laser Chaingunner", "CnC_Nod_RocketSoldier_2SF" }, { "Stealth Black Hand", "CnC_Nod_FlameThrower_2SF" }, { "Sakura", "CnC_Nod_Minigunner_3Boss" }, { "Raveshaw", "CnC_Nod_RocketSoldier_3Boss" }, { "Mendoza", "CnC_Nod_FlameThrower_3Boss" }, { "Technician", "CnC_Nod_Technician_0" }, { "Mutant", "CnC_Nod_Mutant_0_Mutant" }, { "Acolyte", "CnC_Nod_Mutant_1Off_Acolyte" }, { "Templar", "CnC_Nod_Mutant_2SF_Templar" }, { "Kane", "Nod_Kane_HologramHead_small" } }; and then i tryd chancing the random vech crate buy choosing same type of vech to new preset like changing CnC_Nod_Recon_Bike to Nod_Recon_Bike_Player because i had to edit something then did not work so i even chanegs the present in the file NodRVC_recon.txt and GDIRVC_recon.txt char *RandomVehicle[12][3] = { { "GDI Humvee", "humvee", "CnC_GDI_Humm-vee" }, { "Nod Buggy", "buggy", "CnC_Nod_Buggy" }, { "GDI APC", "gdiapc", "CnC_GDI_APC" }, { "Nod APC", "nodapc", "CnC_Nod_APC" }, { "GDI MRLS", "mrls", "CnC_GDI_MRLS" }, { "Nod Mobile Artillery", "arty", "…
creator: _SSnipe_
date: 2007-06-17T21:57:30-00:00

Re: Scripts Part 3
type: item
description: im aslo having toruble making this buy char command i want to be able to do this !Buy(name) or some comamnd and be able to trun into that char right then and there but here somthign new i want it to only let me only do it ingame like only my nick can do it this is what i gto so far i doute it will wrokb ut im trying else if ((stricmp(Msg2, "!Dino") == 0)) Pos = Commands->Get_Position(obj); Vector3 Pos.Z += 0; GameObject *Dino = Commands->Create_Object(team==0?"dino.w3d":"dino.w3d",Pos); Commands->JFW_Flying_Infantry(Dino); if (team == 1) Commands->Set_Player_Type(dino,1); } } const char *WideCharToChar(const wchar_t *wcs); void Chat(int ID, int Type, const wchar_t *Msg) { GameObject *obj = Get_GameObj(ID); int team = Commands->Get_Player_Type(obj); if (Type == 2) return;
creator: _SSnipe_
date: 2007-06-18T06:27:50-00:00

Re: Scripts Part 3
type: item
description: Well even though joe has been asking alot of questions, have to give him credit for trying to mod.
creator: IronWarrior
date: 2007-06-18T06:43:02-00:00

Re: Scripts Part 3
type: item
description: i really am trying lot of stuff bleaive it or not hours of messing around and looking over and over but ya LOL
creator: _SSnipe_
date: 2007-06-18T06:52:04-00:00

Re: Scripts Part 3
type: item
description: I don't have access to a compiler today as i am working in a different office. When I get home I will write you a working random char crate that does what you want, and fix your code so only you can do the !dino command and actually make it work. I want your ingame name, if you have a static ip then that would help too. If you want other characters and stuff too, then you will have to copy what I give you tonight and work it out yourself based on the !dino one. You may wish to send me your current working solution. Please do not think that I will do this all the time, I will not. I want to start back on something I have left alone for a couple of weeks now and it is importnant to me that I get it finished. This will take all of my time. Now do me a favour Joe, stop calling "presets" "presents", I don't know why you keep doing this. If you want people to help you then stop typing lazily. For example, don't type "u", type "you". Also, make sure your sentences have a structure and are punctuated. Sometimes I read your posts and can understand them, but it takes me a while to realise what you are actually asking. I have to make sense of what you mean. I think that sometimes you type whatever is in your head at the time, and your fingers can't keep up with your brain. Just try to articulate yourself better. This will help me to help you, and people will stop giving you such a hard time around here. They might also be inclined to actually help you too. Which is a good thing, as everyone learns this way. =]
creator: reborn
date: 2007-06-18T07:09:34-00:00

Re: Scripts Part 3
type: item
description: Yes sir thank you but i really hope you also teach me what I did Wrong with my crate changes make sure it has what you see. also the dino i just want it to be !dino and turns only me into that char just put <nick> or somthing so i can put my nickname inside myself sorry aswell i do not have a static ip . PS just get some new 1.50 ssaow source files and put those chars into that random char and i dont know about how to get the vech if you can that two as in the codes i posted as you can see and then make sure to show me what i did wrong ok? i really dont have any source code sim really working on yet that was kinda it and it was a failure ..... Tips: dino.w3d DO NOT PUT the flying infantry i changed my mine just make the dino like a basic char with 500 sniper gunn and 200 hp/armor and thats it for the vech crates Nod_Flame_Tank_Player Nod_Stealth_Tank_Player "Nod_Recon_Bike_Player for char crate just like in the code reborn ty so very much
creator: _SSnipe_
date: 2007-06-18T08:19:09-00:00

Re: Scripts Part 3
type: item
description: OK, heres the release version with source code. It is important you either use the ssaow.ini provided, or change yours so that "extras" are not on the disabled list (that had me thinking for a couple of minutes...). The source code is based on SSAOW with the bot fix, I know you asked for just 1.5 but I am assuming at some point you may wish to add bot support, and I won't do this again for you. Here is the download link: http://www.mp-gaming.com/reborn/coderelease/JoesSSAOW.zip The commands are bound to the name "ren00b", just change you name in the source and recompile it. It is importnat you protect this name and make the name !auth itself or something as I normally bind it to the ip too. The commands are "!dino" and "!boss". !dino will change the model to the dino.w3d model, it doesn't work too well tbh, there is no preset for the model so it makes it spawn in that startup "jesus" position.. Just weird IMO. The !boss command will turn the character into a stealth petrova mutant with 1200 health and 1200 armor, the stealth is server side as it is the only preset character other then the sbh to have stealth by defualt. The character crate has also been changed to include your mutant people. You may wish to chnage there names as I called some of them oxi, reborn and zunnie. I would prefer you to keep this tbh. Kinda like a tribute to http://www.mp-gaming.com Screenies: I realise you didn;t want the !boss command, but you can remove it easily, and it should give you an excellent idea of how to make some commands yourself for other purposes.
creator: reborn
date: 2007-06-18T17:08:41-00:00

Re: Scripts Part 3
type: item
description: ty very much may i ask what did i do wrong with the random char create thing? also is there a way i can change so they wont have to disable extras because this mod is made for aow serv not coop this time just tell em and ill change it
creator: _SSnipe_
date: 2007-06-18T23:42:10-00:00

Re: Scripts Part 3
type: item
description: also reborn dino works good for gdi but on nod it dont show up >.<
creator: _SSnipe_
date: 2007-06-19T00:25:55-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Mon, 18 June 2007 19:42 ty very much may i ask what did i do wrong with the random char create thing? also is there a way i can change so they wont have to disable extras because this mod is made for aow serv not coop this time just tell em and ill change it The character crate has code that uses this: Reselect3: int Rnd = Commands->Get_Random_Int(1,101); int Index = 0; if (Rnd <= 10) Index = 0; else if (Rnd <= 20) Index = 1; else if (Rnd <= 30) Index = 2; else if (Rnd <= 40) Index = 3; else if (Rnd <= 50) Index = 4; else if (Rnd <= 60) Index = 5; else if (Rnd <= 65) Index = 6; else if (Rnd <= 70) Index = 7; else if (Rnd <= 75) Index = 8; else if (Rnd <= 80) Index = 9; else if (Rnd <= 85) Index = 10; else if (Rnd <= 90) Index = 11; else if (Rnd <= 99) Index = 12; else Index = 13; I added 10, 11, 12 & 13 which correspond to the four added random characters. You array was fine, just the code used to choose from the array needed to be changed. The disable extra's is sever side. There is no need for a client change. In a defualt ssaow.ini file on the server there is a setting for disabling characters. By defualt the "extras" are disabled. I included a new ssaow.ini in that .zip folder to edit that as the mutant presets come under that extras menu. The clients don't have to chnage anything, it is just the ssaow.ini file on the server. I have no idea why the !dino command works for GDI but not Nod, I didn't test it. I have to leave for work soon so I will not have time to look at it until I get home.
creator: reborn
date: 2007-06-19T04:42:52-00:00

Re: Scripts Part 3
type: item
description: well dont worry about the dino right now i got bigger things here are some server side things that are impotent and on the top of my list for the server im editing fro are asking 1)how can i make it where when an stealth suit is on the floor that when a tank runs over it the tank goes stealth iv seen it before how can i do that? 2) how can i make a char u can turn into without base defenses killing u? 3)also reborn that code u gave me to buy !boss it works but when i added another under it with a another nick the same way it dont work for that nick but the other nick? else if (stricmp(Msg2,"!boss") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick one>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } else if (stricmp(Msg2,"!boss") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick 2>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } } } only nick one works nick 2 dont 4)how can i change the spy into another char? also one that thing thaat code above u posted to edit to let em have the new chars in my crates where is it located?
creator: _SSnipe_
date: 2007-06-19T05:04:38-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Tue, 19 June 2007 01:04 1)how can i make it where when an stealth suit is on the floor that when a tank runs over it the tank goes stealth iv seen it before how can i do that? Make a spawner for the suit and edit the preset to "always allow grant", then attach a script to it that turns the vehichle stealth. This will never be 100% server side and only client with the core-patch or higher will be able to use it. People without the corepatch will be able to see the vehichle as if it is normal and unstealthed. This will make for horrible gameplay and allot of people crying "cheater, ban pl0x admin, he see's stealth", "stealth h4x, ban him". joe937465 wrote on Tue, 19 June 2007 01:04 2) how can i make a char u can turn into without base defenses killing u? Do you mean make a character with a command like !boss or just a character you buy from the purchase terminal or random char crate? Have a look at the "spy_crate" and you will see the scripts attached to the preset that make base defence ignore it. Try making that a project for yourself, it isn;t too challenging and will help you develop. joe937465 wrote on Tue, 19 June 2007 01:04 3)also reborn that code u gave me to buy !boss it works but when i added another under it with a another nick the same way it dont work for that nick but the other nick? else if (stricmp(Msg2,"!boss") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick one>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } else if (stricmp(Msg2,"!boss") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick 2>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } } } only nick one works nick 2 dont You're nearly there. But you're doing it as if it's a whole new command. It needs to be like this (or something similar, will check when I get home if it doesn't work as I still don't have access to the sourec code or a compiler in the office where I am, and there might be a brace missing or something). else if (stricmp(Msg2,"!bos…
creator: reborn
date: 2007-06-19T07:20:51-00:00

Re: Scripts Part 3
type: item
description: well i just need the code tested about the !boss im have about 7 nicks and i dont have a second person to help me test >.< "Make a spawner for the suit and edit the preset to "always allow grant", then attach a script to it that turns the vehichle stealth. This will never be 100% server side and only client with the core-patch or higher will be able to use it. People without the corepatch will be able to see the vehichle as if it is normal and unstealthed. This will make for horrible gameplay and allot of people crying "cheater, ban pl0x admin, he see's stealth", "stealth h4x, ban him" im 100& aware of this i just dont know how to make that script >.<
creator: _SSnipe_
date: 2007-06-19T08:41:41-00:00

Re: Scripts Part 3
type: item
description: and did i do this rigth heres the one i need with all the spaces but not working if (stricmp(Msg2,"!boss") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } i copied what u did but i think i messed up after trying to fix it
creator: _SSnipe_
date: 2007-06-19T09:38:55-00:00

Re: Scripts Part 3
type: item
description: Nope, you forgot lot's of "else". It's hard to find the time to do this at work. I have to stay late tonight at work and i'm visiting my parents tonight too. If I have some time then I will try to post what it should look like and add the vehichle code too for stealth effect and also the !buymed etc etc code. But it might have to wait until tomorow night. There are however at least ten other people who visit these forums that could amend your code, I often wonder why the do not
creator: reborn
date: 2007-06-19T09:53:34-00:00

Re: Scripts Part 3
type: item
description: ty but all i need is the !boss and vechs become stealth techs when they pick up sbh suit i tryed making ym own scripts for a few hours and got no where ok reborn let me try to get this one alone how is this edit? } else if (stricmp(Msg2,"!boss") == 0) { else if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),"l"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } } } 1)"Do you mean make a character with a command like !boss or just a character you buy from the purchase terminal or random char crate? Have a look at the "spy_crate" and you will see the scripts attached to the preset that make base defence ignore it. Try making that a project for yourself, it isn;t too challenging and will help you develop." i tryed to make a script liek this but i dont know where to start can yuo d…
creator: _SSnipe_
date: 2007-06-19T10:11:56-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Tue, 19 June 2007 06:11 how is this edit? } else if (stricmp(Msg2,"!boss") == 0) { else if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),"l"<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } else if (stricmp(Get_Player_Name_By_ID(ID),""<nick>") == 0) { Change_Character(obj,"Mutant_3Boss_Petrova"); } } } } The first " else if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { " you need to remove the else, other then that it looks fine to me. joe937465 wrote on Tue, 19 June 2007 06:11 i tryed to make a script liek this but i dont know where to start can yuo drop me some hints? You still havn't answered if it is something you want to do as part of a command like !spyme, or you want to make a player from the purchase terminal for all people to buy like this :/ joe937465 wrote on Tue, 19 June 2007 06:11 i looked and cant find it /; Open crates.cpp, scroll to there you …
creator: reborn
date: 2007-06-19T11:00:15-00:00

Re: Scripts Part 3
type: item
description: I have had a little time as I got out of work earlier then I thought. I have added a !spy command so that it will turn your player into a sbh and base defence will ignore you, plus it grants you a few weapons too. I would be careful, as this is obviously easily exploitable as a server owner. I have used my name as the primary player name, however I have now changed the code so that two other nick names can be used too. I used nick2 and nick3 as placeholder names for you to change. The code is easily readable so if you want to add more you should be able to follow how I did it for nick2 and nick3 to add more yourself. The !dino command worked for me on both teams, I have no idea why it didn't work for you :/ Maybe you didn't use team chat? To make a player ignored by base defence then use this: "Commands->Set_Is_Visible(obj,false);" where obj is the player, this could change to "sender", "poker" etc etc depending on the situation. Download link to server files and source code: http://www.mp-gaming.com/reborn/coderelease/joesSSAOW2.zip Screeny:
creator: reborn
date: 2007-06-19T17:37:49-00:00

Re: Scripts Part 3
type: item
description: ty and trust me i really am trying to learn thsi stuff now where is thsi code at so i can edit it and look at how it looks? EDIT;NVM wow reborn that command looks kinda easy i may know how to make one like that i may have to make more changes but im still looking into that lol i just make the mod lol i don't decade what to change -_- and ty again so far i have been learning from you also reborn do you see my siggy?
creator: _SSnipe_
date: 2007-06-19T18:38:21-00:00

Re: Scripts Part 3
type: item
description: 1) ok this ones importent for the guys who are asking me to have umm we did the boss and !spy now how can we do a command to alowed u to spectate anywhere on the map? 2) the code for the spy how can i add a script underit?
creator: _SSnipe_
date: 2007-06-19T20:01:29-00:00

Re: Scripts Part 3
type: item
description: Just make a character with no model, jfw_flying_infantry attached to it, make it neutral, make it stealth.
creator: BlueThen
date: 2007-06-19T22:13:50-00:00

Re: Scripts Part 3
type: item
description: BlueThen wrote on Tue, 19 June 2007 17:13 Just make a character with no model, jfw_flying_infantry attached to it, make it neutral, make it stealth. but u still can see the name.........
creator: _SSnipe_
date: 2007-06-19T22:31:32-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Tue, 19 June 2007 16:01 1) ok this ones importent for the guys who are asking me to have umm we did the boss and !spy now how can we do a command to alowed u to spectate anywhere on the map? I created a spectate mode and added it to the source. (All of them are bound to the name "ren00b", but it also works for "nick2" and "nick£", you will need to add other peoples names instead of them there, and if you want more then copy how I did it for these two example placeholders. I really can't stress enough now how much you need to secure those nick names and make them !auth themselves, if someone joined your server via ip and stole the nick whilst no one noticed they could ruin the game for people. Type "!spec1", then type "!spec2" in team chat. This will place you as neutral, remove your model, clear your weapons, and allow you to fly as if you are a helicopter, and base defence will ignore you. Type "!unspecgdi" to return to the GDI side after spectating, and type "!unspecnod" to return to nod after spectating. Some team nuetral start up positions are under the map, so i shoved you up in the air by 80 on the z axis. This maybe un acceptable in some maps, i didn't try them all. You may wish to beta test this out and adjust accordingly. Download link to new source code and server files: http://www.mp-gaming.com/reborn/coderelease/JoesSSAOW3.zip joe937465 wrote on Tue, 19 June 2007 16:01 2) the code for the spy how can i add a script underit? This is most of the spy crate code: else if ((RandomIntCrate <= (percent+=Crate_Spy)) && (Crate_Spy > 0)) { if (Settings->GameMode != 1) goto CrateStart; if (Settings->Gamelog) { char Message[512]; Vector3 pos; pos = Commands->Get_Position(sender); sprintf (Message, "CRATE;SPY;;%d;%s;%f;%f;%f;%f;%f;%f;%d", Commands->Get_ID(sender), Commands->Get_Preset_Name(sender), pos.Y,pos.X,pos.Z, Commands->Get_Facing(sender), Commands->Get_Max_Health(sender),Commands->Get_Max_Shield_Strength(sender),Get_Object_Type(sender)); Wr…
creator: reborn
date: 2007-06-19T23:11:20-00:00

Re: Scripts Part 3
type: item
description: ok i ran into some errors >.< ------ Build started: Project: scripts, Configuration: Release Win32 ------ Compiling... aow.cpp .\aow.cpp(1361) : error C2065: 'Move' : undeclared identifier .\aow.cpp(1507) : error C2001: newline in constant .\aow.cpp(1508) : error C2146: syntax error : missing ')' before identifier 'Change_Team' .\aow.cpp(1509) : error C2143: syntax error : missing ')' before '}' .\aow.cpp(1509) : error C2143: syntax error : missing ';' before ')' .\aow.cpp(1542) : error C2059: syntax error : '}' .\aow.cpp(1542) : error C2143: syntax error : missing ';' before '}' .\aow.cpp(1542) : error C2059: syntax error : '}' .\aow.cpp(1545) : error C2143: syntax error : missing ';' before '{' .\aow.cpp(1545) : error C2447: '{' : missing function header (old-style formal list?) .\aow.cpp(3857) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3859) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3861) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3868) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3870) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3872) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3894) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3897) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3899) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3902) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3905) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3907) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3914) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3917) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3919) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3922) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3925) : error C3861: 'GetIconBone': identifier not found .\aow.cpp(3927) : error C3861: 'GetIconBone': identifier not found Cr…
creator: _SSnipe_
date: 2007-06-19T23:50:05-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Tue, 19 June 2007 19:50 ok i ran into some errors >.< Looks like a missing "}" somewhere. The version I uploaded compiles fine " Build: 2 succeeded, 0 failed, 0 skipped". You must be trying to edit the code yourself. Post the code and I will tell you what needs to change. That is however if you tell me the site of the place that you are doing this mod for...
creator: reborn
date: 2007-06-19T23:58:31-00:00

Re: Scripts Part 3
type: item
description: check your pm and woot reborn i fixed it
creator: _SSnipe_
date: 2007-06-20T00:11:49-00:00

Re: Scripts Part 3
type: item
description: 1)ok heres soem things when u do !spec2 a second time u fall the floor and walk BUT u leave or see foot steps can we fix that? 2) also in spectate u can pick up crate what script can disable that? 3) and how cna i make it so harv cant kill u? 4) how can i make a char stealth (halo_kane_small or somthing? 5)and last when in spec mode how can u make it move faster? ty
creator: _SSnipe_
date: 2007-06-20T07:03:22-00:00

Re: Scripts Part 3
type: item
description: Sorry, I refuse to help you anymore. I have just realised what a complete idiot I have been by not realising who you actually are and who i've been helping all this time. I feel like such an idiot.
creator: reborn
date: 2007-06-20T07:20:39-00:00

Re: Scripts Part 3
type: item
description: dont feel like that man your a good man ok?
creator: _SSnipe_
date: 2007-06-20T07:35:33-00:00

Re: Scripts Part 3
type: item
description: Is he klote lol?
creator: Tunaman
date: 2007-06-20T08:30:47-00:00

Re: Scripts Part 3
type: item
description: can anyone help me still? else if (stricmp(Msg2,"!Spy_Test") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Nod_Kane_HologramHead_small"); Commands->Set_Is_Visible(obj,false); Commands->Give_Powerup(obj,"CnC_POW_MineRemote_02",false); Commands->Give_Powerup(obj,"POW_RepairGun_Player",false); Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false); Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false); Commands->Give_Powerup(obj,"POW_Railgun_Player",false); Commands->Give_Powerup(obj,"POW_Shotgun_Player",false); Commands->Give_Powerup(obj,"CnC_POW_RocketLauncher_Player",false); Commands->Give_Powerup(obj,"POW_Stealth_Suit",false); why wont it go stealth?
creator: _SSnipe_
date: 2007-06-20T19:44:41-00:00

Re: Scripts Part 3
type: item
description: i aslo try t make a simple ! command then pasges u with a text what did i do wrong? { if (stricmp(Msg2,"!version") == 0) { sprintf(Text,"PPAGE %d <nick>",PlayerID); Console_Input(Text); } { if (stricmp(Msg2,"!Modders") == 0) { sprintf(Text,"PPAGE %d Reborn,<other nick>",PlayerID(); Console_Input(Text); } { if (stricmp(Msg2,"!sites") == 0) { sprintf(Text,"PPAGE %d <message> !",PlayerID); Console_Input(Text); } } } } } } }
creator: _SSnipe_
date: 2007-06-20T20:52:20-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Wed, 20 June 2007 14:44 can anyone help me still? else if (stricmp(Msg2,"!Spy_Test") == 0) { if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Nod_Kane_HologramHead_small"); Commands->Set_Is_Visible(obj,false); Commands->Give_Powerup(obj,"CnC_POW_MineRemote_02",false); Commands->Give_Powerup(obj,"POW_RepairGun_Player",false); Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false); Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false); Commands->Give_Powerup(obj,"POW_Railgun_Player",false); Commands->Give_Powerup(obj,"POW_Shotgun_Player",false); Commands->Give_Powerup(obj,"CnC_POW_RocketLauncher_Player",false); Commands->Give_Powerup(obj,"POW_Stealth_Suit",false); why wont it go stealth? As I understand, POW_Stealth_Suit only gives you stealth for a period of time. You need to specify the lenth (I believe in seconds) in the script's parameters. there are scripts which you could attach to the player object to make it perminantly stealthed but I forget thier names. Check the thread titled "Single Player Scripts' or similar.
creator: crazfulla
date: 2007-06-20T21:18:51-00:00

Re: Scripts Part 3
type: item
description: well i trhink the scripts is TDA_Stleath **** how do i add that and the para isnt it command-->attach_scripts:JFW_Flying_Infantry; or somthing but what about the param?
creator: _SSnipe_
date: 2007-06-20T22:21:05-00:00

Re: Scripts Part 3
type: item
description: joe937465 wrote on Wed, 20 June 2007 16:52 i aslo try t make a simple ! command then pasges u with a text what did i do wrong? Here is a simple chat hook addition that when the player says "!testmsg" the server will send a message to the server saying "hey man, don't test me". if (stricmp(Msg2,"!testmsg") == 0) { char Text[256]; sprintf(Text,"msg hey man, don't test me"); Console_Input(Text); } You are basically missing the "Char Text[256];"
creator: reborn
date: 2007-06-20T22:21:37-00:00

Re: Scripts Part 3
type: item
description: Use Commands->Enable_Stealth to make someone stealth. They will only be stealthed for clients with bhs.dll though.
creator: Whitedragon
date: 2007-06-20T22:26:27-00:00

Re: Scripts Part 3
type: item
description: ty reborn and Whitedragon and rest now reborn the char Text[256]; 1)what does it do? 2)and is i a message right? now how do i change it so i can also add ones that are pm's EIDT:i cant seem to get them to work } if (stricmp(Msg2,"!testmsg") == 0) { char Text[256]; sprintf(Text,"msg hey man, don't test me"); Console_Input(Text); } } } } 3) how can i make the spectate move around screen faster? 4) is there a script that makes it where u cant pick up weapons or crates? 5) it still wont go stealth else if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) { Change_Character(obj,"Nod_Kane_HologramHead_small"); Commands->Set_Is_Visible(obj,false); Commands->Give_Powerup(obj,"CnC_POW_MineRemote_02",false); Commands->Give_Powerup(obj,"POW_RepairGun_Player",false); Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false); Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false); Commands->Give_Powerup(obj,"POW_Railgun_Player",false); Commands->Give_Powerup(obj,"POW_Shotgun_Player",false); Commands->Give_Powerup(obj,"CnC_POW_RocketLauncher_Player",false); Commands->Enable_Stealth;
creator: _SSnipe_
date: 2007-06-20T22:47:51-00:00

Re: Scripts Part 3
type: item
description: 1. Read some C++ tutorials about character arrays. 2. You'd send a page like this: sprintf(Text,"ppage %d message",PlayerID); 3. It's not possible to set a preset's speed with the current scripts.dll stuff. The best you could do is change the character to whichever one of the mutants that is faster than the normal characters. 4. There's no script that can do this. 5. You need to do Commands->Enable_Stealth(obj,true);
creator: Whitedragon
date: 2007-06-20T23:32:27-00:00

Re: Scripts Part 3
type: item
description: Whitedragon wrote on Thu, 21 June 2007 00:32 5. You need to do Commands->Enable_Stealth(obj,true); Commands->Set_Model(obj, "c_ag_nod_stlth"); * That works for clients without bhs.dll afaik.
creator: jnz
date: 2007-06-20T23:41:21-00:00

Re: Scripts Part 3
type: item
description: ermm not working >.<
creator: _SSnipe_
date: 2007-06-21T03:25:48-00:00

Re: Scripts Part 3
type: item
description: nvm i got it ty now can i make it so i cant get ran over?
creator: _SSnipe_
date: 2007-06-21T07:06:59-00:00

Re: Scripts Part 3
type: item
description: also cant pick up anything i ask this but i got to make 100% sure
creator: _SSnipe_
date: 2007-06-21T08:40:28-00:00

Re: Scripts Part 3
type: item
description: ok no more answers? ok this is dead
creator: _SSnipe_
date: 2007-06-22T09:48:21-00:00