Zeig uns mal OnPlayerDeath ![smile :)](https://breadfish.de/wcf/images/smilies/emojione/263a.png)
Function OnPlayerDeath(playerid, killerid, reason)
{
GW_OnPlayerDeath(playerid, killerid, reason);
M_OnPlayerDeath(playerid,killerid,reason);
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
TotenKopf[playerid] = CreatePickup(1275,1, pX, pY, pZ);
SetTimerEx("tot", 90000, false, "d", playerid);
new Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
GetPlayerName(playerid, name, sizeof(name));
format(stringz, sizeof(stringz), "%s", name);
DeathText[playerid] = Create3DTextLabel(stringz,0xFFFFFFAA, Float:x, Float:y, Float:z, 10.0, 0);
new string[256];
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
PlayerInfo[playerid][pInvWeapon2] = 0;
PlayerInfo[playerid][pInvAmmo2] = 0;
PlayerInfo[playerid][pMats] = 0;
PlayerInfo[playerid][pDrugs] = 0;
FrakMatsHolding[playerid] = 0;
//Death
if(PlayerInfo[playerid][pKrankenkasse] == 0)
{
GivePlayerMoney(playerid, -1500);
SetPlayerHealth(playerid,150);
FraktionsKasse[4] += 1500;
}
if(PlayerInfo[playerid][pKrankenkasse] == 1)
{
FraktionsKasse[4] += 1500;
}
Kann mir eventuell einer auch zeigen wie ich den Friedhof rausmachen kann also das man direkt wieder spawn ?
//edit ErikSon
Bei OnplayerSpawn steht nix davon nur das halt was ich Weg Gemappt habe
Function OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Bus_LS", true))
{
Attach3DTextLabelToPlayer(TextBus, playerid, 0.0,0.0,0.0);
PlayerInfo[playerid][pCarLic] = 1;//Hier muss der Führerschein gegeben werden! (Anpassen!)
PutPlayerInVehicle(playerid, car_Bus_LS, 0);//car_BulletLS = das Fahrzeug was wir oben erstellt haben, 0 = der Fahrersitz
SetPlayerSkin(playerid, 144); // your skin choice for NPC
}
return 1;
}
SetPVarInt(playerid,"CameraPos",-1);
StopAudioStreamForPlayer(playerid);
GW_OnPlayerSpawn(playerid);
M_OnPlayerSpawn(playerid);
//BSN
RemoveBuildingForPlayer(playerid, 5858, 1214.1484, -913.4453, 43.0547, 0.25);
RemoveBuildingForPlayer(playerid, 1522, 1199.9688, -917.6406, 42.0234, 0.25);
RemoveBuildingForPlayer(playerid, 6010, 1214.1484, -913.4453, 43.0547, 0.25);
//Fahrschule
RemoveBuildingForPlayer(playerid, 11372, -2076.4375, -107.9297, 36.9688, 0.25);
RemoveBuildingForPlayer(playerid, 11014, -2076.4375, -107.9297, 36.9688, 0.25);
Kann das auch an dem Bot liegen?