Help Please(rep)
#1

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);
                        } 
Reply
#2

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

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
Reply
#4

Actually, it should be THIS:

pawn Код:
if (newkeys && KEY_AIM)
Reply
#5

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)
Reply
#6

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""
Reply
#7

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

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

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)