Hey,
hab ein problem mit meinen 2 Medic Spawns.
Und zwar wenn ich Sterbe und zum anderen Spawnen Soll Crashe ich -.-
Hab hier meinen Code den ich zur zeit verwende:
new Float:gMedicSpawns[2][3] = {
{1182.5526,-1323.4912,13.5791},
{2033.2047,-1415.6168,16.9922}
};
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
new string[256];
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
GivePlayerMoney(playerid, -cut);
format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 25.0);
/*SetPlayerInterior(playerid, 5);
rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
MedicTime[playerid] = 1;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
NeedMedicTime[playerid] = 30;
}
else
{
NeedMedicTime[playerid] = 60;
}
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;*/
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]);
PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid, 42, 50000);
gTeam[playerid] = 4;
return 1;
}
Bekomme keinen Error aber Crash wenn ich ingame neu spawne.
LG