SA-MP Forums Archive
TogglePlayerControllabe Alternative - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: TogglePlayerControllabe Alternative (/showthread.php?tid=254942)



TogglePlayerControllabe Alternative - Swiftz - 13.05.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


Respuesta: TogglePlayerControllabe Alternative - admantis - 13.05.2011

There are many altirnativa ways but their cheesy and eating resources, such as setting the position constantly under OnPlayerUpdate.


Re: TogglePlayerControllabe Alternative - Kaperstone - 13.05.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;
}



Re: TogglePlayerControllabe Alternative - Swiftz - 13.05.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


Re: TogglePlayerControllabe Alternative - Swiftz - 13.05.2011

Got an idea can it be done like returning the player to the death positions when onplayerkeystatechange?


Re: TogglePlayerControllabe Alternative - Swiftz - 14.05.2011

Please help me! this is the main part of the whole system


Re: TogglePlayerControllabe Alternative - Razvan_Cosmyn - 14.05.2011

Thanks xkirill


Re: TogglePlayerControllabe Alternative - alpha500delta - 14.05.2011

Quote:
Originally Posted by Razvan_Cosmyn
Посмотреть сообщение
Thanks xkirill
xkirills code won't work. That guy needs to learn how to script >.<


Re: TogglePlayerControllabe Alternative - Jochemd - 14.05.2011

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.


Re: TogglePlayerControllabe Alternative - Swiftz - 14.05.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