ikt 256 Posted April 22, 2011 Hello there. I am in process of creating something and it started to go well! Now I don't know some commands so I'll use this thread to ask it. I want to use GetCharArmour(PlayerChar, aArmor). But what type or something else is aArmor? I tried things, but they're 'incompatible with parameter of u32'. So what does it have to be? Also I want a sort of timer and something that displays the amount of time left on screen, preferably in a form like a bar. How would I do that? Sjaak on another forum was so kind to help me, but I don't know what to do with this piece of code: SetTimerA(0); //timer op 0m_State = Stateblah; //veranderen van de statecase Stateblah:{if (TimerA() > 1000) //na een seconde{do something;m_State= StateDefault; //terug naar de default state, keypresses en tick processing}}break; Where do I place it? Adding it only created headache for me Quote Share this post Link to post Share on other sites
Symbiote 29 Posted April 22, 2011 I'm kind of a programming noob, but to me u32 suggests "unsigned 32-bit integer". Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 23, 2011 AngryAmoeba: You've right Everything, what do you need is defined in Scripting.h. And try to use SampleCustomFiber, it s better than SampleCustom... Here is that Armour: static void GetCharArmour(Ped ped, u32 *pArmour)u32 armour;GetCharArmour(GetPlayerPed, &armour); Quote Share this post Link to post Share on other sites
ikt 256 Posted April 23, 2011 (edited) AngryAmoeba: You've right Everything, what do you need is defined in Scripting.h. And try to use SampleCustomFiber, it s better than SampleCustom... Here is that Armour: static void GetCharArmour(Ped ped, u32 *pArmour)u32 armour;GetCharArmour(GetPlayerPed, &armour); Wait, so u32 does the trick? sh*t, I'm stupid. Thanks About the SampleCustomFiber, why would that be better? Someone said it wasn't the most stable one to use. Other questions:\ - now I have multiple functions in my mod, but how do I force it to just have just one at the time enabled? (like when you activate something, the other things that is engaged stops) - where can I find the functions that have something to do with character movement speed and the force melee applies? Edited April 23, 2011 by ikt Quote Share this post Link to post Share on other sites
ikt 256 Posted April 24, 2011 Bumpitybump and another question: eWeapon wap; GetCurrentCharWeapon(PlayerChar,&wap); SetObjectAlpha(wap, 110); This won't work for fading weapons, is this because of the games engine, or am I doing something wrong? Thanks I think it's the game, because when a weapon is dropped and I walk away, it's always clear and sharp and doesn't disappear like the cans on the ground near it. Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 24, 2011 Bumpitybump and another question: eWeapon wap; GetCurrentCharWeapon(PlayerChar,&wap); SetObjectAlpha(wap, 110); This won't work for fading weapons, is this because of the games engine, or am I doing something wrong? Thanks I think it's the game, because when a weapon is dropped and I walk away, it's always clear and sharp and doesn't disappear like the cans on the ground near it. oou maan, fatal mistake...eWeapon is enum and Object is sripting...so, you have to try to find some function for getting object from weapon and than apply Alpha... Quote Share this post Link to post Share on other sites
ikt 256 Posted April 25, 2011 (edited) Bumpitybump and another question: eWeapon wap; GetCurrentCharWeapon(PlayerChar,&wap); SetObjectAlpha(wap, 110); This won't work for fading weapons, is this because of the games engine, or am I doing something wrong? Thanks I think it's the game, because when a weapon is dropped and I walk away, it's always clear and sharp and doesn't disappear like the cans on the ground near it. oou maan, fatal mistake...eWeapon is enum and Object is sripting...so, you have to try to find some function for getting object from weapon and than apply Alpha... Thanks, I'll look into it I tried this: Object wap;GetWeaponTypeModel(PlayerIndex,wap);SetObjectAlpha(wap, 110); It won't work because somehow the weapon model is still eWeapon. Other question: How do I display a value onscreen? Edited April 25, 2011 by ikt Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 26, 2011 OMG you cannot convert enum to scripting ! Go and learn C++ Quote Share this post Link to post Share on other sites
Symbiote 29 Posted April 26, 2011 You can display a value on screen like this: Game.DisplayText(value); Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 26, 2011 You can display a value on screen like this: Game.DisplayText(value); Mayby offtopic ? And pls stop with that stupid .NET :l Quote Share this post Link to post Share on other sites
lindsayslorach 0 Posted April 26, 2011 @AngryAmoeba - I'm pretty sure he's uding C++, not C#. I would suggest learning C#, it's quite easy to do simple things with the game. And I'm not the best, but I can help you with it if you like. There are some other people here that can help too, I've had some very good help with C# from people in theses forums. Quote Share this post Link to post Share on other sites
Symbiote 29 Posted April 26, 2011 I can't even tell the difference between C# and C++. me = noob; Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 27, 2011 C# is simpliest and much older than C++, C# for example doesnt have bools, C++ is using moore own libs, ... Quote Share this post Link to post Share on other sites
lindsayslorach 0 Posted April 27, 2011 C# doesn't have bools? Have you used C#? I don't think so. It does have bools. Theres nothing wrong with C#, many professional applications are written in C#. Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 27, 2011 (edited) No, C# doesnt have bools...but you can use int, it s something similar... Yeah C# is really good, it s better than C++ and i m using it for coding software for PSP ... But ScriptHooks enviroment was made for C++... Edited April 27, 2011 by Kucikuc24 Quote Share this post Link to post Share on other sites
lindsayslorach 0 Posted April 27, 2011 Bools.. as in booleans.. as in true or false. Yes, C# does have them, no, you dont use ints. Quote Share this post Link to post Share on other sites
Donny78 0 Posted April 27, 2011 He means (I think) the conversion issue, you can't use int as bool in C# but you can in C++. Quote Share this post Link to post Share on other sites
lindsayslorach 0 Posted April 27, 2011 (edited) I thought he might have meant something like that, it's just his post confused me, because its backwards.. No, C# doesnt have bools...but you can use int, it s something similar... I think he might be confusing the two. In C# you can't use ints as bools. Edited April 27, 2011 by lindsayslorach Quote Share this post Link to post Share on other sites
Symbiote 29 Posted April 28, 2011 C# is simpliest and much older than C++ Wikipedia says C++ is 18 years older than C#... Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 28, 2011 C# is simpliest and much older than C++ Wikipedia says C++ is 18 years older than C#... LoL Quote Share this post Link to post Share on other sites
ikt 256 Posted April 29, 2011 Can you modify memory addresses with ScriptHook? Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 29, 2011 What do you mean ? Quote Share this post Link to post Share on other sites
ikt 256 Posted April 29, 2011 What do you mean ? Modify the amount of physics power when fighting by changing a value through the memory addresses. There isn't a native function for that, modifying the value is the most reliable way to 'push' the cars. (If you know something better, please enlighten me.) Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted April 30, 2011 yeah you can ! Just find addresses for this functions and in scripting.h of your thread make your own NATIVE And if you found it, can you place here pls ? Quote Share this post Link to post Share on other sites
ikt 256 Posted May 3, 2011 Addresses didn't work well. Is it possible running two seperate 'threads'? I need one that's contagious and one with a timer, because if I combine the two, sh*t goes wrong. Quote Share this post Link to post Share on other sites
Kucikuc24 4 Posted May 3, 2011 yeah, just link that Quote Share this post Link to post Share on other sites
ikt 256 Posted May 3, 2011 yeah, just link that How do I do that? Multiple files? Or what? Quote Share this post Link to post Share on other sites
ikt 256 Posted June 8, 2011 (edited) Nevermind that. I have gotten the run/sprint animation while holding a rifle, but I can't find the normal running animation with no guns/small arms. Nope: move_melee run All other seem not right, because it would be strange if R* used a mission animation for the most normal thing done in GTA: Running with a small gun. Okay, GTAModding just didn't mention it, but move_generic or something and run works okay. Edited June 11, 2011 by ikt Quote Share this post Link to post Share on other sites