When someone dies, he can walk around why is that
#8

Quote:
Originally Posted by Alex Magaсa
Посмотреть сообщение
On topic of script add this:
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define col_grey 0xADADADFF
But first download sscanf + zcmd include:
Click to download sscanf
Click to download zcmd

Then put this in your script: (create a empty .pwn)
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    // Resetting their position:
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x, y, z);

    // Freezing them in death, he can not respawn:
    TogglePlayerControllable(playerid, 0);
    ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.1, 0, 1, 1, 1, 1, 1);

    // Informing them:
    SendClientMessage(playerid, col_grey, "{FF000}INFO:{FFFFF} You are dead, you can't move!");
    return 1;
}
Credit given where credit due... That's a good code snippet, yet there's a few things wrong...

sscanf and zcmd aren't even used... Your hex codes are wrong too around INFO.

Although, it is a nice snippet of code, +Rep for good code.

Quote:
Originally Posted by Eth
Посмотреть сообщение
It's a common GTA:SA Bug You Can Do onplayerdeath:

pawn Код:
SetTimerEx("KillPlayer",2000,0,"d",playerid);
now:
pawn Код:
forward KillPlayer(playerid);
public KillPlayer(playerid)
{
SetPlayerHealth(playerid,-40);//Try this may work and may not
return 1;
}
Also another good snippet, as long as it actually works as intended when called.



We need the OP to say more about what is happening, and explain more about what led to the problem.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)