Please help.
#1

RESOLVED
Reply
#2

I'm not a pro or anything... but I think that needs to be in "public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)".

Just a suggestion, don't get angry if it wasn't the solution.
Reply
#3

indeed.
Reply
#4

Put this:

pawn Код:
new string[256];
  if (IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
  {
      if(IsPlayerConnected(playerid))
      {
          if((GetPlayerState(playerid) == PLAYER_STATE_DRIVER) && (PlayerFrozen[playerid] == 0) && (PlayerInfo[playerid][pLocked] == 0))
          {
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "  %s has attempted to Start the vehicle", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                printf("%s", string);
                EnterCarTime[playerid] += 1;
                return 1;
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "  You are not in a Vehicle!");
              return 1;
            }
        }
    }
Under OnPlayerKeyStateChange, like this:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new string[256];
  if (IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
  {
      if(IsPlayerConnected(playerid))
      {
          if((GetPlayerState(playerid) == PLAYER_STATE_DRIVER) && (PlayerFrozen[playerid] == 0) && (PlayerInfo[playerid][pLocked] == 0))
          {
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "  %s has attempted to Start the vehicle", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                printf("%s", string);
                EnterCarTime[playerid] += 1;
                return 1;
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "  You are not in a Vehicle!");
              return 1;
            }
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Snyper
I'm not a pro or anything... but I think that needs to be in "public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)".

Just a suggestion, don't get angry if it wasn't the solution.
omg I feel dumb lol thanks for catching that, Do you know what it should be for it to press SHIFT? right now its to press F
Reply
#6

Quote:
Originally Posted by L30
Quote:
Originally Posted by Snyper
I'm not a pro or anything... but I think that needs to be in "public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)".

Just a suggestion, don't get angry if it wasn't the solution.
omg I feel dumb lol thanks for catching that, Do you know what it should be for it to press SHIFT? right now its to press F
I thinks it's KEY_ACTION
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)