Hi!
Ich habe ein kleines Problem!
Ich spawne nach einem Killer immer im LSPD.
public OnPlayerSpawn(playerid)
{
Delete3DTextLabel(TodTexte[playerid]);
DestroyPickup(TodIcons[playerid]);
SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
if(GetPVarInt(playerid, "Jailed") == 1) {
SetPlayerPos(playerid,264.3857,82.2331,1001.0391);
SetPlayerInterior(playerid, 6);
knast[playerid] = SetTimerEx("KnastTimer", 60000, true, "i", playerid);
return 1;
}
new frak = GetPVarInt(playerid, "Fraktion");
if(GetPVarInt(playerid, "Fraktion") == 0) {
SetPlayerPos(playerid, 1022.4252,-1121.8209,23.8717);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,190.1917);
SetPlayerColor(playerid, COLOR_WHITE);
} else {
SetPlayerPos(playerid, Fraks[frak][f_x], Fraks[frak][f_y], Fraks[frak][f_z]);
SetPlayerFacingAngle(playerid, Fraks[frak][f_r]);
SetPlayerInterior(playerid, Fraks[frak][f_inter]);
SetPlayerColor(playerid, Fraks[frak][f_color]);
SetPlayerVirtualWorld(playerid, Fraks[frak][f_world]);
}
beschuss[playerid] = false;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, "Contracted") == 1) {
if(GetPVarInt(killerid, "Fraktion") == 5) {
GivePlayerMoney(killerid, GetPVarInt(playerid, "ContractMoney"));
new s[128];
format(s, sizeof(s), "Du hast für den Mord an %s %i$ Kopfgeld bekommen", GetName(playerid), GetPVarInt(playerid, "ContractMoney"));
SCM(killerid, COLOR_YELLOW, s);
SetPVarInt(playerid, "ContractMoney", 0);
}
}
SetPVarInt(playerid, "Skin", GetPlayerSkin(playerid));
if(killerid != INVALID_PLAYER_ID){
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
TodIcons[playerid] = CreatePickup(1254, 1, X, Y, Z, 0);
new string[128];
format(string, sizeof(string), "%s\nGetötet von: %s", GetName(playerid), GetName(killerid));
TodTexte[playerid] = Create3DTextLabel(string, COLOR_GREY, X, Y, Z, 40, 0, 1);
SetTimerEx("RemoveDeathIcons", 60000, false, "i", playerid);
if(IsACop(killerid) && GetPVarInt(playerid, "Wanteds") > 0){
new w = GetPVarInt(playerid, "Wanteds");
SetPVarInt(playerid, "JailTime", w * 2);
SetPVarInt(playerid, "Wanteds", 0);
SetPlayerWantedLevel(playerid, 0);
SetPVarInt(playerid, "Jailed", 1);
}
}
Tazer[playerid] = false;
if(IsACop(killerid)) return 1;
if(GetPVarInt(playerid, "Contracted") == 1){
if(GetPVarInt(killerid, "Fraktion") == 5){
SetPVarInt(playerid, "Contracted", 0);
new o_w = GetPVarInt(killerid, "Wanteds");
new n_w = o_w + 1;
SetPlayerWantedLevel(killerid, n_w);
SetPVarInt(killerid, "Wanteds", n_w);
new s1[128], s2[128];
format(s1, 128, "Du hast ein Verbrechen begangen: [%s] Zeuge: [%s]", "Mord", "Niemand");
format(s2, 128, "Neues Wantedlevel: [%i]", n_w);
SendClientMessage(killerid, COLOR_LIGHTRED, s1);
SendClientMessage(killerid, COLOR_YELLOW, s2);
new s3[128], s4[128];
format(s3, 128, "HQ: Neues Verbrechen: %s", "Mord");
format(s4, 128, "HQ: Verdächtiger: %s Wantedlevel: %i", GetName(killerid), n_w);
for(new i = 0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(IsACop(i)) {
SendClientMessage(i, COLOR_LIGHTBLUE, s3);
SendClientMessage(i, COLOR_LIGHTBLUE, s4);
}
}
}
}
return 1;
}
new o_ww = GetPVarInt(killerid, "Wanteds");
new n_ww = o_ww + 2;
SetPVarInt(killerid, "Wanteds", n_ww);
SetPlayerWantedLevel(killerid, n_ww);
new s1[128], s2[128];
format(s1, 128, "Du hast ein Verbrechen begangen: [%s] Zeuge: [%s]", "Mord", "Niemand");
format(s2, 128, "Neues Wantedlevel: [%i]", n_ww);
SendClientMessage(killerid, COLOR_LIGHTRED, s1);
SendClientMessage(killerid, COLOR_YELLOW, s2);
new s3[128], s4[128];
format(s3, 128, "HQ: Neues Verbrechen: %s", "Mord");
format(s4, 128, "HQ: Verdächtiger: %s Wantedlevel: %i", GetName(killerid), n_ww);
for(new i = 0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(IsACop(i)) {
SendClientMessage(i, COLOR_LIGHTBLUE, s3);
SendClientMessage(i, COLOR_LIGHTBLUE, s4);
}
}
}
return 1;
}