21.06.2010, 05:56
Make a variable like this:
Then on OnPlayerKeyStateChange:
- It's not a full code, it is for you so you can read and understand it then go ahead and code it yourself!
Код:
IsBusJob[MAX_PLAYERS];
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys==KEY_SUBMISSION && IsBusJob[playerid] == 0 && veh == bus1) // checks if Submission key is pressed + if the player is already working + that the player is in a bus { SendClientMessage(playerid, green, "You started working for the bus company!"); // SCM only one time cause the variable under here. IsBusJob[playerid] = 1; // here's the variable set to 1, this will prevent the player from starting working over again. }