[Help] Adding in an auto-crack system, more space for text.
#1

As you see in the title, i need a working, WORKING, auto-crack system for my server. I need some instructions how to add it, codes etc.

And another, how to add more space for the text's of my server? Ex. /me, /do, talking etc.
Reply
#2

Uhh.. Auto-crack when a player has like 20 HP or less.
Reply
#3

He probably wants that animation crack_(something) to apply when someone has health lower then 20.
Reply
#4

Quote:
Originally Posted by Srkki
Посмотреть сообщение
He probably wants that animation crack_(something) to apply when someone has health lower then 20.
Yep, this. An automatic /crack after a player reaches 20 or lower HP. Also, would be cool to make the cracked player unabled to be kill'd.
Reply
#5

I found and FS related this.
You can create a new callback "OnPlayerHealthChange" with timer or "OnPlayerUpdate". To make the player unable to be killer, I guess "TogglePlayerControllable" can be used.
Reply
#6

in OnPlayerUpdate
foreach blabalbalballba
if(GetPlayerHealth[i] == 20)
{
//animation for /crack
}
Reply
#7

Quote:
Originally Posted by System64
Посмотреть сообщение
in OnPlayerUpdate
foreach blabalbalballba
if(GetPlayerHealth[i] == 20)
{
//animation for /crack
}
You do that with loop in OnPlayerUpdate?
You must be crazy.
Reply
#8

GetPlayerHealth(playerid,health);
if(health <= 29)
{
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 0, 1, 1, 1, 1);
return 1;
}


- Here you go sir, no bugs.
Reply
#9

Quote:
Originally Posted by DiiP
Посмотреть сообщение
GetPlayerHealth(playerid,health);
if(health <= 29)
{
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 0, 1, 1, 1, 1);
return 1;
}


- Here you go sir, no bugs.
Then player just have to click left button mouse and walk away.
Reply
#10

Quote:
Originally Posted by DiiP
Посмотреть сообщение
GetPlayerHealth(playerid,health);
if(health <= 29)
{
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 0, 1, 1, 1, 1);
return 1;
}


- Here you go sir, no bugs.
That isn't much efficient, it will reapply the animation ~60 times/second per player...
You should use an array to check if he has already done the animation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)