SA-MP Forums Archive
Detect CJ Run? - 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: Detect CJ Run? (/showthread.php?tid=244909)



Detect CJ Run? - Antonio [G-RP] - 29.03.2011

Is there a way to detect CJ run?


Re: Detect CJ Run? - ihatetn931 - 29.03.2011

I don't think it's possible.

You could possibly try
pawn Код:
if(UsePlayerPedAnims())
No gurantees it will work tho


Re: Detect CJ Run? - -Rebel Son- - 29.03.2011

Detect if hes spessing the run key.


Re: Detect CJ Run? - JamesC - 29.03.2011

Quote:
Originally Posted by ihatetn931
Посмотреть сообщение
I don't think it's possible.

You could possibly try
pawn Код:
if(UsePlayerPedAnims())
No gurantees it will work tho


@OP: You could try using GetPlayerAnimationIndex like Limex did to detect swimming.


Re: Detect CJ Run? - Antonio [G-RP] - 29.03.2011

Quote:
Originally Posted by JamesC
Посмотреть сообщение


@OP: You could try using GetPlayerAnimationIndex like Limex did to detect swimming.
Thanks for the tips, I'll give it a look.


Re: Detect CJ Run? - iCMDX - 29.03.2011

pawn Код:
//CMDX
//under public OnPlayerUpdate(playerid)
if(GetPlayerAnimationIndex(playerid))
{
     new animlib[32],animname[32],acstring[128],acname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, acname, sizeof(acname));
     GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
     if(strcmp(animlib, "PED", true) == 0)
     {
          if(strcmp(animname, "RUN_PLAYER", true) == 0)
          {
               format(acxstring, 128, "[WARNING]: %s[%d] Banned by CMDX-AC, Reason: CJ Run", acname, playerid);
               SendClientMessageToAll(0xFFFFFFFF, acstring);
               BanEx(playerid, "CJ Run");
          }
     }
     return 1;
}



Re: Detect CJ Run? - Antonio [G-RP] - 29.03.2011

Well that's a tad stupid, I just found it and wrote the code myself to find this. Thanks iCMDX


Re: Detect CJ Run? - antonio112 - 29.03.2011

Would you mind posting it here? Someone else could use it (like me). Thanks !


Re: Detect CJ Run? - Antonio [G-RP] - 29.03.2011

Look 2 posts above...


Re: Detect CJ Run? - antonio112 - 29.03.2011

Oh, ok ... thanks. I tought you found another solution, didn`t really understood your post earlier but I got it now.


Re: Detect CJ Run? - X3nZ - 29.03.2011

Put: UsePlayerPedAnims()

Under: OnGameModeInit - It will enable the CJ run style.

Edit: Nevermind, I thought you wanted to use the CJ running style. My bad.