15.07.2009, 16:29
How can i do that if some player aim on some specific intrior he will get killed?.
example: for not killing in the bank ..
example: for not killing in the bank ..
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & <aim key here>)
{
if (GetPlayerInterior(playerid)) //any interiors but outside.
{
if (GetPlayerWeapon(playerid)) //any weapons but fists.
{
SetPlayerHealth(playerid, 0.0); //kill
return true;
}
}
}
return false;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & /*don't kno what that the tightmousebuttonkey is key is*/)
{
if (GetPlayerInterior(playerid) > 0) //any interiors but outside.
{
if (GetPlayerWeapon(playerid) > 0) //any weapons but fists.
{
SetPlayerHealth(playerid, 0.0); //kill
return true;
}
}
}
return false;
}