29/08/2022 08:44
Código PHP:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
if( playerid != INVALID_PLAYER_ID )
{
if(IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z))
{
amount = 0.0;
ApplyAnimation(playerid, "DAM_JUMP", "DAM_Dive_Loop", 4.1, 0, 0, 0, 1, 0, 1);
TogglePlayerControllable(playerid, false);
SetTimerEx("Controlavel2", 3000, false, "i", playerid);
SendClientMessage(playerid, -1, "INFO: Proibido DM em Area Safe!");
ShowPlayerDialog(playerid, 5599, DIALOG_STYLE_MSGBOX, "INFO", "Proibido DM em Area Safe!", "OK", #);
return 1;
}
}
}
// fim do gm
Function Controlavel2(playerid)
{
TogglePlayerControllable(playerid, true);
ClearAnimations(playerid, 1);
SetCameraBehindPlayer(playerid);
return 1;
}