10.04.2011, 23:57
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(Pressed(KEY_FIRE) || Holding(KEY_FIRE) || Released(KEY_FIRE)) { for(new i = 0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i) && playerid != i && !IsPlayerNPC(i)) { if(IsPlayerAiming(playerid, i) && GetPlayerState(i) == PLAYER_STATE_ONFOOT && GetPlayerWeapon(playerid) == 23) { SendClientMessage(i, -1, "Vocк foi imobilizado."); SendClientMessage(playerid, -1, "Vocк imobilizou o jogador."); TogglePlayerControllable(i, 0); } } } } return 1; }