PDA

View Full Version : OnPlayerStateChange help..


Pettersen
18/05/2013, 11:23 AM
**DELETE

RajatPawar
18/05/2013, 11:26 AM
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;
}

Pettersen
18/05/2013, 12:22 PM
**DELETE