18.04.2012, 04:41
Quote:
|
Se o jogador estiver em um veнculo, vai sair algo errado aн.
pawn Код:
|
.Porйm seu cуdigo tambйm й falho: se o jogador combinar a tecla de pulo com outra (produzindo Ctrl direito + Space por exemplo), ele conseguirб burlar o bloqueio e, consequentemente, pular
.Por isso o ideal seria:
pawn Код:
//No OnPlayerKeyStateChange:
if(newkeys & KEY_JUMP && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Float:P_Pos[3];
GetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
SetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
SendClientMessage(playerid, 0xFF0000FF, "Proibido pular !");
}
Espero ter ajudado
.

