Problem with TogglePlayerControllable
#1

Hi guys, I have found out TogglePlayerControllable (TGP) does not work properly. I usually use this function for AFK system.

For example:

PHP Code:
new bool:isAFK[MAX_PLAYERS];
dcmd_afk(playeridparams[])
{
#pragma unused params
if(isAFK[playerid] == false)
{
TogglePlayerControllable(playerid0);
isAFK[playerid] = true;
}
else
{
TogglePlayerControllable(playerid1);
isAFK[playerid] = false;
}

TGP works against hit by a weapon or a vehicle, but when I hit a player by fist, then I am able to kill him.

Is it there any solution, how fix that problem? Thanks in advance for a help
Reply


Messages In This Thread
Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 10:19
Re: Problem with TogglePlayerControllable - by Hrb - 27.02.2018, 11:42
Re: Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 13:18
Re: Problem with TogglePlayerControllable - by Hrb - 27.02.2018, 14:10
Re: Problem with TogglePlayerControllable - by Sew_Sumi - 27.02.2018, 14:52
Re: Problem with TogglePlayerControllable - by Lucases - 27.02.2018, 21:02
Re: Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 21:07
Re: Problem with TogglePlayerControllable - by Sew_Sumi - 27.02.2018, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)