SA-MP Forums Archive
How can I script this... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I script this... (/showthread.php?tid=291905)



How can I script this... - Cr4zyR0d - 22.10.2011

How can I make that Players can hold a Ak-47/M4/Spas-12/Shotgun or any other big gun, with only one hand... and I can run fast holding it with one hand.

I will appreciate your help,
Thanks.


Re: How can I script this... - =WoR=G4M3Ov3r - 22.10.2011

You're probably using CJ Run.

delete this from your script

PHP код:
UsePlayerPedAnims(); 



Re: How can I script this... - Roperr - 22.10.2011

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
You're probably using CJ Run.

delete this from your script

PHP код:
UsePlayerPedAnims(); 
I think he's actually trying to make them run fast.

Add this to OnGameModeInit:

UsePlayerPedAnims();


Re: How can I script this... - =WoR=G4M3Ov3r - 22.10.2011

Quote:
Originally Posted by Roperr
Посмотреть сообщение
I think he's actually trying to make them run fast.

Add this to OnGameModeInit:

UsePlayerPedAnims();
Quote:
Originally Posted by Cr4zyR0d
Посмотреть сообщение
How can I make that Players can hold a Ak-47/M4/Spas-12/Shotgun or any other big gun, with only one hand... and I can run fast holding it with one hand.

I will appreciate your help,
Thanks.
Come again ?


Respuesta: How can I script this... - Cr4zyR0d - 22.10.2011

Код:
UsePlayerPedAnims();
	// Player Class's
	for(new i = 0; i <= sizeof(PedSkins)-1; i++)
	{
		AddPlayerClass(PedSkins[i][0],982.1890,-1624.2583,14.952,90,-1,-1,-1,-1,-1,-1);
	}
I have to delete all this?^


Re: Respuesta: How can I script this... - =WoR=G4M3Ov3r - 22.10.2011

Quote:
Originally Posted by Cr4zyR0d
Посмотреть сообщение
Код:
UsePlayerPedAnims();
	// Player Class's
	for(new i = 0; i <= sizeof(PedSkins)-1; i++)
	{
		AddPlayerClass(PedSkins[i][0],982.1890,-1624.2583,14.952,90,-1,-1,-1,-1,-1,-1);
	}
I have to delete all this?^
Yes. As long as you don't have this UsePlayerPedAnims(); You won't have any problems.

As for AddPlayerClass, this is how it works

PHP код:
AddPlayerClass(skinFloat:xFloat:yFloat:zFloat:Angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo
Its the skin you spawn in, so basically delete the whole thing.

After that pick the skin you want your players to spawn in, and use it this way.

PHP код:
public OnGameModeInit()
{
    
AddPlayerClass(2401958.331343.1215.36269.15000000);
    return 
1;




Respuesta: How can I script this... - Cr4zyR0d - 22.10.2011

Haha yeah, thanks it works now D

Now I will check how to make them to move their hands like talking, when someone write something "In-Character"..

Really Really appreciated man, Thanks..


Re: Respuesta: How can I script this... - =WoR=G4M3Ov3r - 22.10.2011

No problem.

Quote:
Originally Posted by Cr4zyR0d
Посмотреть сообщение
Now I will check how to make them to move their hands like talking, when someone write something "In-Character"..

Really Really appreciated man, Thanks..
Its an animation https://sampwiki.blast.hk/wiki/ApplyAnimation

List of animations

G'luck.


Respuesta: How can I script this... - Cr4zyR0d - 22.10.2011

Haha I don't understand that, I'm not a Scripter, I just know the simple things..
I got the chat as anim In Game, to move your hands like talking you have to do /chat 5, and I don't like that, I just want to make them move their hands atomacally.