Pessoal meu servidor ta travando sempre quando eu do um soco, o que pode seR? tipo trava 1 segundo e depois volta, ai se eu do outro soco trava, se eu aperto varias vezes pra dar uma sequencia de soco trava e dps volta
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
if(newkeys == KEY_YES)
{
if(IsPlayerInAnyVehicle(playerid))
{
cmd_motor(playerid, "");
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2313.5828, -16.6369, 26.7496))
{
cmd_banco(playerid, "");
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 325.5666, 155.1835, 1014.1875)
|| IsPlayerInRangeOfPoint(playerid, 3.0, 2412.3828, -1386.3807, 24.6703)
|| IsPlayerInRangeOfPoint(playerid, 3.0, 134.2965, -1495.4653, 18.7656)
|| IsPlayerInRangeOfPoint(playerid, 3.0, 1685.4232, -2301.4858, 13.5303)
|| IsPlayerInRangeOfPoint(playerid, 3.0, -113.3518, -172.8874, 1000.7000)
|| IsPlayerInRangeOfPoint(playerid, 3.0, 325.0913, 305.0590, 999.1484)
|| IsPlayerInRangeOfPoint(playerid, 3.0, 414.9285, 2535.1543, 19.1484))
{
cmd_infoprof(playerid, "");
}
}
if(newkeys == 2 || newkeys == 2 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInAnyVehicle(playerid))
{
if(INFO_P[playerid][Profissao_P] == 3)
{
cmd_portaoprefeitura(playerid, "");
}
if(INFO_P[playerid][Profissao_P] == 4)
{
cmd_portaomarinha(playerid, "");
cmd_pmarinha1(playerid, "");
cmd_pmarinha2(playerid, "");
}
}
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
cmd_int(playerid, "");
if(IsPlayerInRangeOfPoint(playerid, 1.0, 247.7, 72.4, 1004.1) || IsPlayerInRangeOfPoint(playerid, 1.0, 244.89999, 73.9, 1004.1))
{
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
cmd_p_dp(playerid, "");
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 250.89999, 64.6, 1004.1) || IsPlayerInRangeOfPoint(playerid, 1.0, 250.39999, 64.6, 1004.1))
{
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
cmd_p_escritorio(playerid, "");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.4384, 88.0093, 1003.6406) || IsPlayerInRangeOfPoint(playerid, 2.0, 1568.6433, -1690.0801, 6.2188))
{
ShowPlayerDialog(playerid, 24, DIALOG_STYLE_LIST, "Elevador DP", "Departamento de Policia Militar\nEstacionamento", "Confirma", "Cancela");
}
if(TMulta[playerid] == false)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, -32.5250, -185.9025, 1003.5469)
|| IsPlayerInRangeOfPoint(playerid, 1.0, 1929.5508, -1772.4053, 13.5469)
|| IsPlayerInRangeOfPoint(playerid, 1.0, 2326.0229, -1645.9604, 14.8270)
|| IsPlayerInRangeOfPoint(playerid, 1.0, 2352.9958, -1357.0411, 24.3984)
|| IsPlayerInRangeOfPoint(playerid, 1.0, 1729.8451, -1943.8606, 13.5687))
{
if(INFO_P[playerid][Dinheiro_do_Jogador_P] < 3) return SendClientMessage(playerid, COR_ERRO, ": ERRO : Vocк nгo tem $3 para comprar a bebida."),
TogglePlayerControllable(ID_2PESSOA, 0), SetTimerEx("Descongelar",500,0,"i",playerid), PlayerPlaySound(playerid, 1055, 0, 0, 0);
SendClientMessage(playerid, 0x7536B5FF, ": INFO : Vocк comprou uma na maquina de refrigerantes e pagou $3.");
TMulta[playerid] = true;
SetTimerEx("Tempo_Multa", segundos(4), false, "i", playerid);
INFO_P[playerid][Dinheiro_do_Jogador_P] -= 3;
INFO_P[playerid][Necessidade_Sede_P] += 7;
if(INFO_P[playerid][Necessidade_Sede_P] >= 100)
{
INFO_P[playerid][Necessidade_Sede_P] = 100;
}
PlayerPlaySound(playerid, 1054, 0, 0 ,0);
Salvar_Contas(playerid);
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, -33.9067, -186.0233, 1003.5469)
||IsPlayerInRangeOfPoint(playerid, 1.0, 330.7480, 177.7599, 1019.9912)
||IsPlayerInRangeOfPoint(playerid, 1.0, 331.9005, 177.7591, 1019.9912)
||IsPlayerInRangeOfPoint(playerid, 1.0, 371.6003, 177.7130, 1019.9844)
||IsPlayerInRangeOfPoint(playerid, 1.0, 374.9007, 188.2365, 1008.3893)
||IsPlayerInRangeOfPoint(playerid, 1.0, 351.6461, 206.0935, 1008.3828)
||IsPlayerInRangeOfPoint(playerid, 1.0, 361.5295, 159.3572, 1008.3828)
||IsPlayerInRangeOfPoint(playerid, 1.0, 2153.8279, -1015.6901, 62.8843))
{
if(INFO_P[playerid][Dinheiro_do_Jogador_P] < 3) return SendClientMessage(playerid, COR_ERRO, ": ERRO : Vocк nгo tem $3 para comprar o salgado."),
TogglePlayerControllable(ID_2PESSOA, 0), SetTimerEx("Descongelar",500,0,"i",playerid), PlayerPlaySound(playerid, 1055, 0, 0, 0);
SendClientMessage(playerid, 0x7536B5FF, ": INFO : Vocк comprou um lanche na maquina de salgados e pagou $3.");
TMulta[playerid] = true;
SetTimerEx("Tempo_Multa", segundos(4), false, "i", playerid);
INFO_P[playerid][Dinheiro_do_Jogador_P] -= 3;
INFO_P[playerid][Necessidade_Fome_P] += 7;
if(INFO_P[playerid][Necessidade_Fome_P] >= 100)
{
INFO_P[playerid][Necessidade_Fome_P] = 100;
}
PlayerPlaySound(playerid, 1054, 0, 0 ,0);
Salvar_Contas(playerid);
}
}
}
return true;
}