Thread: ScriptHook
View Single Post
Old 04-07-2009   #8
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,862
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
Quote:
Originally Posted by Leito View Post
wow! rappo, very, very thanks, it works But I don't know why i have to change #include in CustomFiberThread.cpp on #include . It depends on version? I've got Visual C++ 2008, and Scripthook 0.2.3. I thanks one more time.
sorry that was vBulletin that took it out - I fixed it, youre right it has to be there! I use the same versions as you



And for changing the animation, the best thing to do is use SparkIV to look at other scripts. Since the names of the animations and groups aren't the same as the .wad file, you need to look them up in scripts. You use SparkIV to open the /common/data/cdimages/script.img file, and in there you will see .sco files. Open up the .sco file you want and search around for "TaskPlayAnim" and you'll see the code that you need.

For an example, I looked at Brian's script and it gave me names that I put in the animation (I also changed playSpliff variable to playAnim). This animation makes Niko stand and wave:
Code:
void CustomFiberThread::RunScript() {
	while(IsThreadAlive()) {
		if((GetAsyncKeyState(VK_F12) && 1) != 0) {
			LogInfo("Requesting animation");
			RequestAnims("missbrian_1");
			playAnim = true;
		}

		if(playAnim && HaveAnimsLoaded("missbrian_1")) {
			LogInfo("Playing animation");
			TaskPlayAnim(GetPlayerPed(), "friendly_idle", "missbrian_1", 4.0f, 0, 0, 0, 0, -1);
			playAnim = false;
		}

		Wait(100);
	}
}

If you want to find something specific, you have to think where it might be. Like if you want something related to taxis, you can check "taxi.sco". If you want omething that you remember was in a mission, you can find the mission script.
rappo is online now   Reply With Quote