TogglePlayerControllable - Death System -
Carxi - 26.03.2014
Hello, i've one problem with
TogglePlayerControllable because i've set this params for freeze the player when he is dead.
How can i resolve this?
This is my script, thanks:
PHP код:
SendClientMessage(playerid,COLOR_LIGHTRED,"Sei stato ferito. Perderai sempre piщ HP almeno che un medico non arrivi.");
SendClientMessage(playerid,COLOR_LIGHTRED,"Puoi usare /accettamorte tra 1 minuto. Per fermare l'attesa.");
TogglePlayerControllable(playerid,0);
ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
SetPlayerHealth(playerid,50);
death_hploss[playerid] = 60;
death_cooldown[playerid] = 60;
Re: TogglePlayerControllable - Death System -
Bingo - 26.03.2014
Код:
TogglePlayerControllable(playerid,1);
0 - Player cant move or move mouse anything
1 - Player can run, move his/her mouse.
Re: TogglePlayerControllable - Death System -
Carxi - 26.03.2014
Quote:
Originally Posted by [vTc]Patroool
Код:
TogglePlayerControllable(playerid,1);
0 - Player cant move or move mouse anything
1 - Player can run, move his/her mouse.
|
Yes, i know this but the problem is when any player try to kill, he is invunerable!
Does not receive damage, and i've try to leave TogglePlayerControllable and the player can move and escape.
Re: TogglePlayerControllable - Death System -
Beckett - 26.03.2014
What actually happens, you don't get froze?
Re: TogglePlayerControllable - Death System -
Bingo - 26.03.2014
Because,
You already setted victims health.
Код:
SetPlayerHealth(playerid,50);
Try to add
Код:
TogglePlayerControllable(playerid,0);*
At last.
*Where you are using this code btw? Because here you used
playerid which means the killer get frozed and his health setted tp 50.
Show where you using.
Re: TogglePlayerControllable - Death System -
Carxi - 26.03.2014
Quote:
Originally Posted by DaniceMcHarley
What actually happens, you don't get froze?
|
He is froze but when i try to kill he don't lose HP.
Re: TogglePlayerControllable - Death System -
Bingo - 26.03.2014
Quote:
Originally Posted by Carxi
He is froze but when i try to kill he don't lose HP.
|
Add
Код:
TogglePlayerControllable(playerid,0);
At last of all the codes.
Re: TogglePlayerControllable - Death System -
Carxi - 26.03.2014
Quote:
Originally Posted by [vTc]Patroool
Add
Код:
TogglePlayerControllable(playerid,0);
At last of all the codes.
|
Okay, when i kill the player whit my hands, he lose hp.
But when i kill with the guns he don't lose hp.
Re: TogglePlayerControllable - Death System -
AhmedMohamed - 26.03.2014
of course it's bug in your server not on the code.
Re: TogglePlayerControllable - Death System -
Carxi - 26.03.2014
Quote:
Originally Posted by AhmedMohamed
of course it's bug in your server not on the code.
|
Is possible in OnPlayerKeyStateChange?