Posts: 516
Threads: 153
Joined: Sep 2009
Reputation:
0
Hi i'm making new car system but when i lock car and i want to be driver it won't call OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) but why?
Posts: 6,129
Threads: 36
Joined: Jan 2009
31.07.2011, 11:13
(
Последний раз редактировалось Calgon; 31.07.2011 в 13:17.
)
OnPlayerEnterVehicle is called when a player is preparing to enter a vehicle, so for example: when a player hits the 'F' key near-by a car.
You can use OnPlayerStateChange, this might be a more appropriate callback if you're forcing a player in to a car, or if you want it to call when they directly enter the vehicle instead of before.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(newstate == 2 && oldstate != 2) {
/* your code here */
return 0;
}
return 0;
}
Posts: 516
Threads: 153
Joined: Sep 2009
Reputation:
0
Not helping... i use 0.3c vehicle system.
Posts: 6,129
Threads: 36
Joined: Jan 2009
That doesn't change anything. Try avoiding from returning anything other than 0 in OnPlayerStateChange for your other GMs/FSs.
Posts: 6,129
Threads: 36
Joined: Jan 2009
oh I give up, you didn't even read what I posted.
Posts: 516
Threads: 153
Joined: Sep 2009
Reputation:
0
I try what he write but i get same result. F key is not working...