13.08.2015, 19:50
make your health 79 and try to use it
Edit:
On player get demage for 10 seconds will can't use this command and if died / 10 seconds left without demage will be able to use it
PS: if didn't work give me your command
Edit:
On player get demage for 10 seconds will can't use this command and if died / 10 seconds left without demage will be able to use it
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
SetPVarInt(playerid,"health22",1);
SetTimerEx( "health21", 10000, false, "i",playerid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(playerid,"health22",0);
return 1;
}
forward dialog3(playerid);
public dialog3(playerid)
{
if(GetPVarInt(playerid, "health22") == 1) {
SendClientMessage(playerid,-1,"[NGP]: you cannot use cmds while you in a fight or lossing health");
}else{
SetTimerEx( "dialog3", 15000, false, "i",playerid);
}
return 1;
}
forward health21(playerid);
public health21(playerid)
{
SetPVarInt(playerid,"health22",0);
return 1;
}