Kill Nachricht (Frage)

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo.


    Ist dies richtig Formuliert?



    SendClientMessage(killerid, 0xFFD70000, " Du wurdest von %s getötet.", playerid);
    } else {
    SendClientMessage(killerid, 0xFF009B00, " Du hast den Spieler %s getötet.", issuerid);

  • Beitrag von Renz ()

    Dieser Beitrag wurde vom Autor gelöscht ().
  • Ja aber wie mache ich das der Killer also der, der die Person getötet hat eine Nachricht bekommt. das er die Person gekillt hat.
    Und wie bekommt der gekillte eine Message.


    Muss man irgendwelche Variabelen setzen?
    Wenn ja, welche?


  • new string[128],string2[128];
    new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,name2,sizeof(name2));
    format(string,sizeof(string),"Du wurdest von %s getötet.",name2);
    format(string2,sizeof(string2),"Du hast den Spieler %s getötet.",name);
    SendClientMessage(playerid,0xFFD70000,string);
    SendClientMessage(killerid,0xFFD70000,string2);

  • An @IceWave & alle anderen



    Function OnPlayerDeath(playerid, killerid, reason)
    {
    GW_OnPlayerDeath(playerid, killerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    if(killerid != INVALID_PLAYER_ID) {
    {
    if(killerid == playerid)
    {
    SendClientMessage(killerid, 0xFFD70000, " Du wurdest von ss getötet.");
    } else {
    SendClientMessage(killerid, 0xFF009B00, " Du hast den Spieler ss getötet.");
    }
    }


    bei mir ist dies anders wie soll das so gemacht werden


  • if(killerid != INVALID_PLAYER_ID)
    {
    if(killerid == playerid)
    {
    SendClientMessage(playerid,0xFFD70000,"Du hast dich selbst getötet!");
    }
    else
    {
    new string[128],string2[128];
    new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,name2,sizeof(name2));
    format(string,sizeof(string),"Du wurdest von %s getötet.",name2);
    format(string2,sizeof(string2),"Du hast den Spieler %s getötet.",name);
    SendClientMessage(playerid,0xFFD70000,string);
    SendClientMessage(killerid,0xFFD70000,string2);
    }
    }

    Müsste so die gleiche Funktion haben

  • Ach und hier kam das



    C:\Users\korha\Desktop\German Reality\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\utils.inc(52) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\morphinc.inc(5) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\morphinc.inc(5) : warning 219: local variable "y" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\morphinc.inc(5) : warning 219: local variable "z" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\M_Bot.inc(147) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\M_Bot.inc(285) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\M_Bot.inc(292) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\M_Bot.inc(486) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\M_Bot.inc(801) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\pawno\include\MD5.inc(312) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3701) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3701) : warning 219: local variable "y" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3701) : warning 219: local variable "z" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3717) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3717) : warning 219: local variable "y" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3717) : warning 219: local variable "z" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3738) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3781) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3791) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3809) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3819) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3876) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(3877) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(4176) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(4178) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(4416) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(4955) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5256) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5258) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5258) : warning 219: local variable "y" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5258) : warning 219: local variable "z" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5305) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5305) : warning 219: local variable "y" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5305) : warning 219: local variable "z" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5372) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(5383) : warning 219: local variable "x" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6094) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6126) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6145) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6145) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6158) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6177) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6177) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6191) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6229) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6239) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6259) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6354) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6369) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6416) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6431) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6484) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6603) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6620) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6620) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6630) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(6630) : warning 202: number of arguments does not match definition
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7678) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7679) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7719) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7721) : error 021: symbol already defined: "GetPlayerPos"
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7725) : error 021: symbol already defined: "GetPlayerPos"
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7730) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7738) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7740) : error 021: symbol already defined: "M_GivePlayerMoney"
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7740) : warning 215: expression has no effect
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7740) : error 001: expected token: ";", but found ")"
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7741) : error 021: symbol already defined: "M_SetPlayerHealth"
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7744) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7757) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7761) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7766) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7770) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7774) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7779) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7783) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7785) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7787) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7793) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7797) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7802) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7804) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7808) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7812) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7818) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\gamemodes\German-Reality.pwn(7820) : error 010: invalid function or declaration


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.




    Ich habe es so eingefügt



    Function OnPlayerDeath(playerid, killerid, reason)
    {
    GW_OnPlayerDeath(playerid, killerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    if(killerid != INVALID_PLAYER_ID)
    {
    if(killerid == playerid)
    {
    SendClientMessage(playerid,0xFFD70000,"Du hast dich selbst getötet!");
    }
    else
    {
    new string[128],string2[128];
    new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,name2,sizeof(name2));
    format(string,sizeof(string),"Du wurdest von %s getötet.",name2);
    format(string2,sizeof(string2),"Du hast den Spieler %s getötet.",name);
    SendClientMessage(playerid,0xFFD70000,string);
    SendClientMessage(killerid,0xFFD70000,string2);
    }
    }

  • Function OnPlayerDeath(playerid, killerid, reason)
    {
    GW_OnPlayerDeath(playerid, killerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    if(killerid != INVALID_PLAYER_ID)
    {
    if(killerid == playerid)
    {
    SendClientMessage(playerid,0xFFD70000,"Du hast dich selbst getötet!");
    }
    else
    {
    new string[128],string2[128];
    new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,name2,sizeof(name2));
    format(string,sizeof(string),"Du wurdest von %s getötet.",name2);
    format(string2,sizeof(string2),"Du hast den Spieler %s getötet.",name);
    SendClientMessage(playerid,0xFFD70000,string);
    SendClientMessage(killerid,0xFFD70000,string2);
    }
    }
    }