[HELP]New Keys Not Working
#1

Why Is Not Working

My Code
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new Money = GetPlayerMoney(playerid);
if (PRESSED(KEY_SUBMISSION))
{
if(Money > 49)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 4018.4192, -567.8613, 34.7879))
{
GivePlayerWeapon(playerid, 22, 35);
GivePlayerMoney(playerid, -75);
}
}
}
return 1;
}
Update 1

1.I have 1 pickup (don't do anything just rotating around
2.If I am In Her I want to press a key (submission for me) and if i have 50$ buy 1 piece
3.Compile with no error


P.S Sorry My Bad English I Am ROMANIAN
Reply
#2

You should explain more Anyways I'm assuming this code is for buying a weapon

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new Money = GetPlayerMoney(playerid);
  if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
  {
    if(Money > 49)
    {
      if(IsPlayerInRangeOfPoint(playerid, 7.0, 4018.4192, -567.8613, 34.7879))
      {
         GivePlayerWeapon(playerid, 22, 35);
         GivePlayerMoney(playerid, -75);
      }
    }
  }
 return 1;
}
Reply
#3

Quote:
Originally Posted by DJDhan
You should explain more Anyways I'm assuming this code is for buying a weapon

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new Money = GetPlayerMoney(playerid);
  if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
  {
    if(Money > 49)
    {
      if(IsPlayerInRangeOfPoint(playerid, 7.0, 4018.4192, -567.8613, 34.7879))
      {
         GivePlayerWeapon(playerid, 22, 35);
         GivePlayerMoney(playerid, -75);
      }
    }
  }
 return 1;
}
Not Woring
Compile with no error
Reply
#4

Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by DJDhan
You should explain more Anyways I'm assuming this code is for buying a weapon

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new Money = GetPlayerMoney(playerid);
  if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
  {
    if(Money > 49)
    {
      if(IsPlayerInRangeOfPoint(playerid, 7.0, 4018.4192, -567.8613, 34.7879))
      {
         GivePlayerWeapon(playerid, 22, 35);
         GivePlayerMoney(playerid, -75);
      }
    }
  }
 return 1;
}
Not Woring
Compile with no error
Well, that is the correct code. Maybe you have something wrong in the GM and Pawno won't recognize it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)