Sorry, ich muss hier ein kleines Missverständnis aufklären. Es ging nicht um die Pickups sondern um die 3DTextLabels. Entschuldigung das ich mich falsch ausgedrückt habe. Also hier ist das OnPlayerDeath.
public OnPlayerDeath(playerid, killerid, reason)
{
// Objekte
new playername[MAX_PLAYER_NAME+1], pname[MAX_PLAYER_NAME+1], killername[MAX_PLAYER_NAME+1], pkiller[MAX_PLAYER_NAME+1], pFrac[20], wanteds, moneytocop, DeathPickupID, DeathSkullPickup, Text3D:Death3DTextLabel, killerfracTitle[30], killerfrac[30], message[256], query[180];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, killername, sizeof(killername));
mysql_real_escape_string(playername, pname);
mysql_real_escape_string(killername, pkiller);
GetPVarString(killerid, "fracTitle", killerfracTitle, sizeof(killerfracTitle));
GetPVarString(killerid, "fracname", killerfrac, sizeof(killerfrac));
GetPlayerPos(playerid, x, y, z);
if (killerid != INVALID_PLAYER_ID)
{
if (!strcmp("army", killerfrac, false) || !strcmp("fbi", killerfrac, false) || !strcmp("sapd", killerfrac, false))
{
if (GetPVarInt(playerid, "wanteds") != 0)
{
moneytocop = GetPVarInt(playerid, "wanteds") * COP_KILL_WANTED_PLAYER_MONEY;
format(message, sizeof(message), "~w~Gesuchter umgebracht~n~Bonus: ~g~$%d Dollar", moneytocop);
GameTextForPlayer(killerid, message, 5000, 1);
GivePayDayMoney(killerid, moneytocop);
format(message, sizeof(message), "<< %s %s hat den Verbrecher %s getötet! >>", killerfracTitle, killername, playername);
SendClientMessageToAll(red, message);
}
else
{
if (IsPlayerInPrison(playerid) == 1)
{
PlayerSpawn(playerid);
}
else
{
PutPlayerInHospital(playerid, killerid);
}
}
}
else
{
if (IsPlayerInPrison(killerid) != 1)
{
wanteds = GetPVarInt(killerid, "wanteds") + WANTED_PER_KILL;
GivePlayerWanteds(killerid, wanteds);
for (new i = 0; i <= MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPVarString(i, "fracname", pFrac, sizeof(pFrac));
if (!strcmp("army", pFrac, false) || !strcmp("fbi", pFrac, false) || !strcmp("sapd", pFrac, false))
{
format(message, sizeof(message), "* HQ: %s[ID:%d] wird gesucht, Grund: Vorsätzlicher Mord - Zeuge: Unbekannt", killername, killerid);
SendClientMessage(i, blue2, message);
format(message, sizeof(message), "* HQ: Er hat derzeit %d Wanteds und muss verhaftet werden!", GetPVarInt(i, "wanteds"));
SendClientMessage(i, blue2, message);
}
}
}
format(message, sizeof(message), "Du hast ein Verbrechen begangen (Vorsätzlicher Mord). Wanted-Sterne bekommen: %d, Zeuge: Unbekannt", WANTED_PER_KILL);
SendClientMessage(killerid, darkred, message);
format(message, sizeof(message), "Derzeitiges Wanted-Level: %d", GetPVarInt(killerid, "wanteds"));
SendClientMessage(killerid, darkred, message);
}
if (IsPlayerInPrison(playerid) == 1)
{
PlayerSpawn(playerid);
}
else
{
PutPlayerInHospital(playerid, killerid);
}
}
format(query, sizeof(query), "UPDATE users SET kills = kills + 1 WHERE userID = %d", strval(getUserID(pkiller)));
mysql_query(query);
}
format(query, sizeof(query), "UPDATE users SET deaths = deaths + 1 WHERE userID = %d", strval(getUserID(pname)));
mysql_query(query);
/* DEATH SKULL PICKUP FOR MEDICS */
SetPVarFloat(playerid, "DeathPointX", x);
SetPVarFloat(playerid, "DeathPointY", y);
SetPVarFloat(playerid, "DeathPointZ", z);
DeathSkullPickup = CreatePickup(1254, 1, x, y, z, -1);
format(message, sizeof(message), "†\n\n%s", playername);
Death3DTextLabel = Create3DTextLabel(message, grey, x, y, z, 15.0, 0, 0);
SetPVarInt(playerid, "DeathPickupID", DeathSkullPickup);
SetPVarInt(playerid, "Death3DTextLabel", Death3DTextLabel);
SetPVarInt(playerid, "DeathPickupTimer", 1);
SetPVarInt(playerid, "PlayerDeath", 1);
/* PLAYER SPAWNED */
SetPVarInt(playerid, "spawned", 0);
return 1;
}
Ich bekomme in SetPVarInt(playerid, "Death3DTextLabel", Death3DTextLabel); folgende Meldung:
warning 213: tag mismatch