Onplayerkeystate problem
#3

I guess I fixed it.

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new veh = GetPlayerVehicleID(playerid);
  if(veh == bus3 || veh == bus2 || veh == bus1 && IsBusJob[playerid] == 0) {
  if (newkeys==KEY_SUBMISSION) // checks if Submission key is pressed + if the player is already working + that the player is in a bus
  {
    SendClientMessage(playerid, LIME, "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.
    busdriver[playerid] = 1;
   	SetPlayerCheckpoint(playerid, buspoint1, 3.0);
   	GameTextForPlayer(playerid, "~g~Bus Driver Started!", 3000, 3);
   	new name[MAX_PLAYER_NAME], string[48];
   	GetPlayerName(playerid, name, sizeof(name));
   	format(string, sizeof(string), "%s Is Now A Bus Driver!.", name );
   	SendClientMessageToAll(LIME, string); } }
  	else SendClientMessage(playerid, COLOR_RED,"You Have To Be In A Bus To Start The Mission!");
	}
    return 1;
}
Reply


Messages In This Thread
Onplayerkeystate problem - by sscarface - 26.01.2013, 19:18
Re: Onplayerkeystate problem - by Roach_ - 26.01.2013, 19:24
Re: Onplayerkeystate problem - by Rupert - 26.01.2013, 19:24
Re: Onplayerkeystate problem - by sscarface - 26.01.2013, 20:04
Re: Onplayerkeystate problem - by sscarface - 26.01.2013, 20:07
Re: Onplayerkeystate problem - by Roach_ - 26.01.2013, 20:11
Re: Onplayerkeystate problem - by sscarface - 26.01.2013, 20:17
Re: Onplayerkeystate problem - by Roach_ - 26.01.2013, 20:24
Re: Onplayerkeystate problem - by sscarface - 26.01.2013, 20:35
Re: Onplayerkeystate problem - by Roach_ - 26.01.2013, 20:44

Forum Jump:


Users browsing this thread: 3 Guest(s)