SA-MP Forums Archive
About Muscle... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About Muscle... (/showthread.php?tid=179908)



About Muscle... - JulietaZ - 29.09.2010

As i know, the muscle stat its allways at lvl 1....and it would increase melee damage, it is possible to increase the muscle lvl?


Re: About Muscle... - Retardedwolf - 29.09.2010

No. (8char)

But you can increase how much a player hits another player tho, using OnPlayerKeyStateChange.


Re: About Muscle... - Steven82 - 29.09.2010

Quote:
Originally Posted by Retardedwolf
View Post
No. (8char)

But you can increase how much a player hits another player tho, using OnPlayerKeyStateChange.
I've always asked about how to do that and no one knows, can you explain?


Re: About Muscle... - samgreen - 29.09.2010

Quote:
Originally Posted by Steven82
View Post
I've always asked about how to do that and no one knows, can you explain?
This is referring to a small hack where you check when players use their fire button and damage players in a very small radius. Obviously it is only effective with melee weapons, and the behavior is not always consistent.


Re: About Muscle... - JulietaZ - 29.09.2010

So it means when player pushes attack button while wearing melee weapons, or barehanded...it will do the normal attack and also do a radius attack to simulate damage increased? it means it will do a splash damage around the player itself? so with 1 attack u dont even need to aim carefuly? (remembers me the zombie server XD)...or there is any way to deal damage only to the front?


Re: About Muscle... - samgreen - 29.09.2010

Yes you can use some basic trigonometry with the two players facing angles, and break out of the loop to ensure only one person gets hit.


Re: About Muscle... - JulietaZ - 30.09.2010

any hint about how to start searching? i mean what name..or what commands i need to search for in the wiki? XD


Re: About Muscle... - samgreen - 30.09.2010

Quote:
Originally Posted by JulietaZ
View Post
any hint about how to start searching? i mean what name..or what commands i need to search for in the wiki? XD
I believe someone wrote a filterscript containing a function like IsPlayerLookingAtPlayer(playerid, playerid2). Take a look at the code for that. If it is not around, you will need to read up on finding the angle between two vectors. The first vector being the position vector of the player with the melee weapon, and the second vector being the displacement between the first player and the second player. If you are still having trouble with this, I can post some pseudocode. Hope this helps!


Re: About Muscle... - JulietaZ - 30.09.2010

Thanks, this is like my first week learning....so i understand what u said because i used to script in anoher games...but i dont know how to do that in this game, and find something in the forum its kinda hard because wahtever i write it allways finds roleplay servers ...:S..I was checking that look at face code thing....but it tells when both players are facing eachoter, i guess if u remove the par when the script check the second player angle..then it would work...right? XD....why they did not let us just increase muscle lvl...and avoid all this stuff? i checked the stats and muscle on multiplayer is jut lvl 1 D=