Gate with sprint key and jump key
#1

Hey guys. I was making my gate opening and close with sprint and jump
This is the code
Код:
if ((newkeys & 8) && !(oldkeys & 8))
 	if(IsPlayerInRangeOfPoint(playerid, 4.0, 1540.6035,-1626.6842,13.3828))
	{
	if(GetPlayerColor(playerid) == 0x2641FEAA || 0x33AA33AA)
	{
	MoveObject(lspdgate,1539.6375732422,-1619.1240234375,12.202730178833, 2.0);
	}
	else {
 	SendClientMessage(playerid, 0x33AA33AA, "You are not part of the UA or LSP!");
	}
	return 1;
	
	}
Well. 2 problems.
It works when I am on foot. but not when I am in a car
When I am in a vehcile it opens when I stand close to it and move with W and S xD
on foot it works that I have to do jump and sprint

And it works for everyone not only for
if(GetPlayerColor(playerid) == 0x2641FEAA || 0x33AA33AA)


Please help
Reply
#2

Well I dont have to sprint for it but I want that the gate opens when you do Space in a car.
if ((newkeys & && !(oldkeys & )
That
Reply
#3

Actulley you can

pawn Код:
if(newkeys == KEY_HANDBRAKE)
{
//Whatever here
}
Reply
#4

ye I know xD That is the same as this if ((newkeys & && !(oldkeys & )
But I really need to fix all these stuff :P
Reply
#5

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Torran
Actulley you can

pawn Код:
if(newkeys == KEY_HANDBRAKE)
{
//Whatever here
}
Handbrake is not sprint.
ACtualy. it is xD Because Sprinting is space and handbrake is space :P

But please help me now xD
Reply
#6

He said space key

Quote:
Originally Posted by bartje01
Well I dont have to sprint for it but I want that the gate opens when you do Space in a car.
if ((newkeys & && !(oldkeys & )
That
Reply
#7

Yeyeye xD Please help already xD Almost have to sleep and I wanna have it done before
Reply
#8

Quote:
Originally Posted by bartje01
Yeyeye xD Please help already xD Almost have to sleep and I wanna have it done before
pawn Код:
if(newkeys == KEY_HANDBRAKE)
{
//Whatever here
}
Reply
#9

seif. Then please show a example of your idea
Reply
#10

Quote:
Originally Posted by bartje01
seif. Then please show a example of your idea
Quote:
Originally Posted by Torran
Quote:
Originally Posted by bartje01
Yeyeye xD Please help already xD Almost have to sleep and I wanna have it done before
pawn Код:
if(newkeys == KEY_HANDBRAKE)
{
//Whatever here
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)