SA-MP Forums Archive
Help me, please. Thanks. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me, please. Thanks. (/showthread.php?tid=111794)



Help me, please. Thanks. - Austin_Lynn - 04.12.2009

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (IsKeyJustDown(KEY_FIRE, newkeys, oldkeys))
  {
    if(IsPlayerConnected(playerid))
	{
	  if(GetPlayerWeapon(playerid) == 40)
	  {
        if (PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pLeader] != 8)
	    {
          SendClientMessage(playerid, COLOR_GREY, "You are not a hitman!");
          return 1;
     	}
    	if (PlayerInfo[playerid][pC4] == 0)
      	{
      	  SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't planted a bomb!");
	      return 1;
    	}
    	CreateExplosion(bx, by, bz, 7, 4);
        PickUpC4(playerid);
     }     
   }
  }
  return 1;
}
Why does it only work when I am at the X Y Z of bomb?
I want it to work if I am anywhere.


Re: Help me, please. Thanks. - Austin_Lynn - 04.12.2009

Anyone?