Hallo
Ich habe ein GF (Goodfather) editiert undzwar so doll, das
von GF nicht mehr viel zu sehen ist, folglich habe ich es mal hier gepostet, weil ich das Krankenhaussystem rausgenommen habe
und es verbessern wollte. Doch Leider klappt es nicht.
Was soll passieren ?
1.Spieler stirbt.
2.Spieler wird zur Position gesetzt wo gestorben ist.
3.Spieler soll an der gespawnten Pos, Crackdeath Anim ausführen.
4.Medic kommt und revivet Spieler und bekommt Trinkgeld.
Was passiert ?
1.Spieler Stirbt.
2. Spieler wird ohne Anim gespawnt.
3. Spieler ist am Spawnpunkt.
PWN Code
OnPlayerDeath
if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
new Float:xx,Float:yy,Float:zz;
GetPlayerPos(playerid,xx,yy,zz);
SetPlayerPos(playerid,xcc[playerid],ycc[playerid],zcc[playerid]);
SetPlayerInterior(playerid,inte[playerid]);
PlayerInfo[playerid][pTot] = 1;
}
OnPlayerSpawn
if(ZuerstSpawn[playerid] == 0)
{
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,0,0);
ClearAnimations(playerid);
ZuerstSpawn[playerid] = 1;
SetPlayerColor(playerid,0xFFFFFFFF);
}
if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 2)
{
SetPlayerColor(playerid,0xFFFFFFFF);
new Float:xx = xcc[playerid];
new Float:yy = ycc[playerid];
new Float:zz = zcc[playerid];
SetPlayerInterior(playerid,inte[playerid]);
SetPlayerPos(playerid,xx,yy,zz);
GameTextForPlayer(playerid,"~r~Du bist verwundet.",2000,6);
SetPlayerHealth(playerid,1);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,0,0);
return 1;
}
SetPlayerSpawn
if(ZuerstSpawn[playerid] == 0)
{
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,0,0);
ClearAnimations(playerid);
ZuerstSpawn[playerid] = 1;
SetPlayerColor(playerid,0xFFFFFFFF);
}
if(PlayerInfo[playerid][pTot]==1&&PlayerInfo[playerid][pLevel]>=2&&PlayerInfo[playerid][pJailed]==0&&PlayerInfo[playerid][pGangJailed]==0&&PlayerPaintballing[playerid]==0)
{
SetPlayerColor(playerid,0xFFFFFFFF);
new Float:xx = xcc[playerid];
new Float:yy = ycc[playerid];
new Float:zz = zcc[playerid];
SetPlayerInterior(playerid,inte[playerid]);
SetPlayerPos(playerid,xx,yy,zz);
GameTextForPlayer(playerid,"~r~Du bist verwundet.",2000,6);
SetPlayerHealth(playerid,1);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,0,0);
return 1;
}
Und einen Timer zum Updaten
OnGameModeInit
SetTimer("Totsein",2500,1);
timer
forward Totsein();
public Totsein()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTot]==1)
{
ApplyAnimation(i,"CRACK","crckdeth2",4.0,1,0,0,0,0);
GameTextForPlayer(i,"~r~Du bist verwundet.",2500,6);
SetPlayerHealth(i, 10);
}
}
}