25.07.2012, 13:37
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_NO) && !(oldkeys & KEY_NO))//If player presses N (Key no)
{
if(CopVariable[playerid] = certainvalue)
{
if(GetPlayerWantedLevel(playerid) >= 1)
{
TogglePlayerControllable(GetClosestPlayerToPlayer(playerid),0);
}
}
}
return 1;
}