Posts: 328
Threads: 79
Joined: Jan 2011
Im making a death system, So when player dies he will be set freeze by setting TogglePlayerControllabe to false or 0. But what TogglePlayerControllable does is, It make player invulnerable (his hp doesnt decrease even if we shoot). I want to make it so that he cant move and also he can be shot down
Posts: 2,524
Threads: 109
Joined: Sep 2009
Reputation:
0
There are many altirnativa ways but their cheesy and eating resources, such as setting the position constantly under OnPlayerUpdate.
Posts: 3,004
Threads: 12
Joined: May 2011
try this

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerControllable(playerid,0);
SetPlayerHealth(playerid, 0.1);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/accept death", cmdtext, true, 10) == 0)
{
TogglePlayerControllable(playerid,1);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, 0, 0, 0);
SendClientMessage(playerid, 0x667788,"haha!the medic's throw you out of the ambolance!");
return 1;
}
return 0;
}
Posts: 328
Threads: 79
Joined: Jan 2011
Lmao xkril ! Once look what i asked. @Admantis really? But some servers have it, They can shoot dead players! So i was wondering if there was an easy way to do without lag
Posts: 328
Threads: 79
Joined: Jan 2011
Got an idea can it be done like returning the player to the death positions when onplayerkeystatechange?
Posts: 328
Threads: 79
Joined: Jan 2011
Please help me! this is the main part of the whole system
Posts: 2,220
Threads: 154
Joined: Jul 2009
Reputation:
0
Use an animation like an injured one and make the player impossible to cancel it. I'm not sure if he can die now but you can try.
Posts: 328
Threads: 79
Joined: Jan 2011
I solved it, I just made a variable if the player is dead and when he is dead i made him to return to the dead place co-ordinates under onplayerkeystatechange