Specific FightingStyle for specific skin id's - 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: Specific FightingStyle for specific skin id's (
/showthread.php?tid=486999)
Specific FightingStyle for specific skin id's -
Flatz - 11.01.2014
It is possible to set for example boxing fight-style for specific skin id?
Thanks!
Re: Specific FightingStyle for specific skin id's -
Hammad97 - 11.01.2014
Nope. It's not possible
Re: Specific FightingStyle for specific skin id's -
xZdadyZx - 11.01.2014
PHP код:
if (strcmp(cmdtext, "/boxing", true) == 0)
if(GetPlayerSkin(playerid) == SKIN_ID_YOU_WANT_TO_USE)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
return 1;
}
Should this work?
Or on player spawn get player skin and setplayerfighting sytle
Re: Specific FightingStyle for specific skin id's -
Konstantinos - 11.01.2014
Of course you can!
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
switch (GetPlayerSkin(playerid))
{
case 2: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
case 270: SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
default: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
}
return 1;
}
An example above.
If the skin is 2, then it will set the fighting style to kneehead.
Else if the skin is 270 (Ryder's I think), then it will set the fighting style to boxing.
Else it will set the fighting style to kung fu.
Quote:
Originally Posted by Hammad97
Nope. It's not possible
|
so sure..