public OnPlayerKeyStateChange
#1

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     return 1;
}
The question is how do I do for move a vehicle without "be" vehicle's inside, using this callback above. I kept 10min thinking and nothing e_e... I know how to use keys, but I dont know how to move vehicle, like driving normally, but not being his inside. If anyone knows.. please help me !
Reply
#2

a uber way is to apply a dead or laying animation in the car, it's like a ghost car :P tho its a bit bizarre it can work, hehe.
Reply
#3

pawn Код:
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"Get outta tha car!");
Reply
#4

Lol? nothing to do both of you... I just want move the vehicle through keys, without being vehicle's inside...
Reply
#5

Impossible to make the vehicle drive without a player / bot it in.
Reply
#6

Dude, it's really senseless... what to do anims with that? I think it might work if player state was detected as driver..
Код:
4 Player exits a vehicle
5 Player enters a vehicle as driver
6 Player enters a vehicle as passenger
Can anyone help me? it's really confusing

@wolf: since you can with remote control cars, it's possible with normal ones..
Reply
#7

RC cars PUT you in the vehicle, but freeze the player, make it invisible or somehting like that.
What we mean with animations? Add a dead animation or animation that will make the player go underground, therefore invisible.
Reply
#8

What's the animation, so?
Reply
#9

WUZI | CS_Dead_Guy

Probably, says the wiki. The only bug I could find when you do this is if the car is too high or when you jump with the character is visible untill you land again. Make your own functions, like store player position in a array, and when' hes done using his "ghost car", set it back to the stored position.
Reply
#10

I bet it'd work. But isn't that what really I thought would happen. Automatically when a player enter in a vehicle, player state is changed for, according that:
Код:
4 Player exits a vehicle
5 Player enters a vehicle as driver
6 Player enters a vehicle as passenger
And my idea would be remove player from vehicle without change player state for the "4" (player exits a vehicle). And since the player weren't removed, it'd be like if the player would be on the vehicle still. A soluction would be "SetPlayerState", since does exists "GetPlayerState". But I dont know if it does exists, or if is there a stock/function =S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)