Guden,
Ich habe mir ein Paar TextDraws zur anzeige des Lebens.. erstellt! Wenn ich diese jetzt unter onPlayerSpawn anzeigen lassen will crashed mein Game (liegt nicht an mir bei anderen crashed es auch!) Nun wollt ich mal wissen ob jemand weiß woran das liegen kann!
Einmal onplayerdeath wo sie ausgeblendet werden sollen;
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
////////////////////////LEBEN
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
Leben[playerid] = CreatePickup(1240, 1, pX, pY, pZ ,-1);
////////////////////////KILLERID
GivePlayerMoney(killerid, 1000);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
pInfo[killerid][Kills]+=1;
GameTextForPlayer(killerid, "~g~+1000$" , 3000 , 3);
////////////////////////PLAYERID
pInfo[playerid][Tode]+=1;
Defusekit[playerid] = 0;
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid, "~r~-1000$" , 3000 , 3);
TextDrawHideForPlayer(playerid, Heal[playerid]);
TextDrawHideForPlayer(playerid, Punkte);
TextDrawHideForPlayer(playerid, Armour[playerid]);
TextDrawHideForPlayer(playerid, BankGeld[playerid]);
TextDrawHideForPlayer(playerid, Uhr);
if(killerid != playerid)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
spectating[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Du bist Tot drücke F um den Spectating Modus zu beenden!");
}
if(IsTerrorist(killerid))
{
tpunkte += 1;
return 1;
}
else if(IsCounterTerrorist(killerid))
{
ctpunkte += 1;
return 1;
}
return 1;
}
und hier onplayerspawn wo sie wieder eingeblended werden sollen:
public OnPlayerSpawn(playerid)
{
UpdateBank(playerid);
SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
SetPlayerSkin(playerid, skin[playerid]);
SetPlayerSkillLevel(playerid, 0, 1);
SetPlayerSkillLevel(playerid, 1, 1);
SetPlayerSkillLevel(playerid, 2, 1);
SetPlayerSkillLevel(playerid, 3, 1);
SetPlayerSkillLevel(playerid, 4, 1);
SetPlayerSkillLevel(playerid, 5, 1);
SetPlayerSkillLevel(playerid, 6, 1);
SetPlayerSkillLevel(playerid, 7, 1);
SetPlayerSkillLevel(playerid, 8, 1);
SetPlayerSkillLevel(playerid, 9, 1);
SetPlayerSkillLevel(playerid, 10, 1);
TextDrawShowForPlayer(playerid, Uhr);
TextDrawShowForPlayer(playerid, Punkte);
TextDrawShowForPlayer(playerid, BankGeld[playerid]);
TextDrawShowForPlayer(playerid, Heal[playerid]);
TextDrawShowForPlayer(playerid, Armour[playerid]);
if(IsTerrorist(playerid))
{
new rand = random(sizeof(TerrorSpawns));
SetPlayerPos(playerid, TerrorSpawns[rand][0], TerrorSpawns[rand][1], TerrorSpawns[rand][2]);
SetPlayerFacingAngle(playerid, TerrorSpawns[rand][3]);
SetPlayerColor(playerid, COLOR_T);
GivePlayerWeapon(playerid, 4, 500); //Messer
GivePlayerWeapon(playerid, 22, 120); //Silenced
return 1;
}
else
{
new rand = random(sizeof(CTSpawns));
SetPlayerPos(playerid, CTSpawns[rand][0], CTSpawns[rand][1], CTSpawns[rand][2]);
SetPlayerFacingAngle(playerid, CTSpawns[rand][3]);
SetPlayerColor(playerid, COLOR_CT);
GivePlayerWeapon(playerid, 4, 500); //Messer
GivePlayerWeapon(playerid, 23, 120); //Silenced
return 1;
}
}
Hoffe ihr könnt mir helfen!
//PUSH