SA-MP Forums Archive
OnPlayerStateChange help.. - 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)
+--- Thread: OnPlayerStateChange help.. (/showthread.php?tid=438015)



**DELETE** - Pettersen - 18.05.2013

**DELETE


Re: OnPlayerStateChange help.. - RajatPawar - 18.05.2013

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
      if(newkeys & KEY_YES)
      {
            new Float:pos[ 3 ];
            for(new i ; i < MAX_PLAYERS ; i++)
            {
                    GetPlayerPos(i, pos[0], pos[1], pos[2]);
                    if(IsPlayerInRangeOfPoint(playerid, 10, pos[0], pos[1], pos[2]))
                    {
                        SetPlayerHealth(i, 100);
                        return SendClientMessage(i, -1, "You have been healed.");
                    }
                    else continue;
        }
   }
   return 1;
}



**DELETE** - Pettersen - 18.05.2013

**DELETE