SA-MP Forums Archive
Help Please(rep) - 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: Help Please(rep) (/showthread.php?tid=329153)



Help Please(rep) - Dan_Barocu - 27.03.2012

i made a thing how can i make it only Ped Attack?i want it only right click but if i press space it ejects me from car i have nothing..if i take it out i can press space normal..please help!

PHP код:
    if (newkeys==KEY_AIM)
                        {
                        
ClearAnimations(playerid);
                        } 



Re: Help Please(rep) - Dan_Barocu - 27.03.2012

anyone know please help do i have to wait 2-3 days?


Re: Help Please(rep) - Admigo - 27.03.2012

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
i made a thing how can i make it only Ped Attack?i want it only right click but if i press space it ejects me from car i have nothing..if i take it out i can press space normal..please help!

PHP код:
    if (newkeys==KEY_AIM)
                        {
                        
ClearAnimations(playerid);
                        } 
Lol check this:
Код:
if (newkeys==KEY_AIM)
That code means if key is not KEY_AIM.(==)
Change it to:
Код:
if (newkeys & KEY_AIM)
Nice to help you


Re: Help Please(rep) - Twisted_Insane - 27.03.2012

Actually, it should be THIS:

pawn Код:
if (newkeys && KEY_AIM)



Re: Help Please(rep) - Admigo - 27.03.2012

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Actually, it should be THIS:

pawn Код:
if (newkeys && KEY_AIM)
I recom him & . If u use && ,the key only work if u dont press any other buttons. With & u can press it everytime(while driving or other things with keys)


Re: Help Please(rep) - Dan_Barocu - 27.03.2012

well if i press "space" while driving it ejects me from car..if i take it out and press space it workd fine.. weird.. i tried admigo lets see twisted

Edit:Twisted doesent all button pressed are Aim..
Added: this is my define its good?
""#define KEY_AIM 128""


Re: Help Please(rep) - [ABK]Antonio - 27.03.2012

https://sampwiki.blast.hk/wiki/OnPlayerK...e#Introduction


Re: Help Please(rep) - Dan_Barocu - 27.03.2012

i looked at this before this is how i made cmd..i dont know what to do?


Re: Help Please(rep) - Admigo - 27.03.2012

You want to stop animations? I think u dont need that in a vehicle.
So make:
Код:
if (newkeys & KEY_AIM && GetPlayerState(playerid)==PLAYER_STATE_ONFOOT) 
{ 
      ClearAnimations(playerid);
      return 1;
}
Let me know if it works


Re: Help Please(rep) - Dan_Barocu - 27.03.2012

no work..same as before.. ( i press space and it ejects me from vehicle.. please try it if you dont understand..