Help me with onplayerdeath
#29

I'm not sure, that this is what you mean, but It's working, I tested it out...


At the top of your script:
pawn Код:
new Float: deathx, Float:deathy, Float:deathz;
and then somewhere there, put:

pawn Код:
public OnPlayerDeath(playerid)
{
    GetPlayerPos(playerid, deathx, deathy, deathz);
    SetPVarInt(playerid, "Death", 1);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/acceptdeath", cmdtext, true, 10) == 0)
    {
        if(GetPVarInt(playerid, "Death") == 0) return SendClientMessage(playerid, 0xFF4646FF, "You are not dead.");
        GivePlayerMoney(playerid, -500);
        SetPVarInt(playerid, "Death", 0);
        SetPlayerPos(playerid, deathx, deathy, deathz);
    }
    return 1;
}
Reply


Messages In This Thread
Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:22
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:24
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:25
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:29
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:30
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:31
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:34
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:36
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:40
Re: Help me with onplayerdeath - by XePloiT - 27.11.2010, 20:41
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:41
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:42
Re: Help me with onplayerdeath - by XePloiT - 27.11.2010, 20:46
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:47
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:55
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:57
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 20:58
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 20:59
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:00
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 21:02
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:03
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 21:05
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:06
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 21:07
Re: Help me with onplayerdeath - by Auxxx - 27.11.2010, 21:09
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:09
Re: Help me with onplayerdeath - by WillyP - 27.11.2010, 21:11
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:11
Re: Help me with onplayerdeath - by Auxxx - 27.11.2010, 21:35
Re: Help me with onplayerdeath - by gangster350 - 27.11.2010, 21:50
Re: Help me with onplayerdeath - by XePloiT - 27.11.2010, 22:09
Re: Help me with onplayerdeath - by Lilcuete - 27.11.2010, 22:30
Re: Help me with onplayerdeath - by Auxxx - 28.11.2010, 10:09
Re: Help me with onplayerdeath - by gangster350 - 28.11.2010, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)