SA-MP Forums Archive
OnPlayerDeath buggy - 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: OnPlayerDeath buggy (/showthread.php?tid=266544)



OnPlayerDeath buggy - MuLtiVaN - 05.07.2011

so, ive been working on a hospital script(german, sry) and i addet this:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	Inenforcer[playerid] = 0;
	Watching[playerid] = 0;
	Goto[playerid] = 0;
	dutyvar[playerid] = 0;
	SpielerInfo[playerid][Tode] += 1;
	print("morde");
	SpielerInfo[killerid][Morde] += 1;
	print("tode");
	gekillt[playerid] = 1;
	print("gekillt");
	SpielerInfo[playerid][Friedhof] += 1;
	SpielerInfo[playerid][Friedhofzeit] += 2;
	print("2 abfragen");
	Speichern(playerid);
	Speichern(killerid);
	print("gespeichernt");
	return 1;
}
but the print returns at "morde",

bug?


Re: OnPlayerDeath buggy - WooTFTW - 05.07.2011

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    Inenforcer[playerid] = 0;
    Watching[playerid] = 0;
    Goto[playerid] = 0;
    dutyvar[playerid] = 0;
    SpielerInfo[playerid][Tode] += 1;
    if(killerid != INVALID_PLAYER_ID)
    {
        SpielerInfo[killerid][Morde] += 1;
        Speichern(killerid);
    }
    gekillt[playerid] = 1;
    SpielerInfo[playerid][Friedhof] += 1;
    SpielerInfo[playerid][Friedhofzeit] += 2;
    print("2 abfragen");
    Speichern(playerid);
    print("gespeichernt");
    return 1;
}