Beiträge von Fabian

    da wo public steht
    stock hin machen
    und forward weg.



    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6613) : error 029: invalid expression, assumed zero
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6613) : error 017: undefined symbol "declare"
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6626) : error 035: argument type mismatch (argument 2)
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6628) : error 017: undefined symbol "declare"
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6635) : error 017: undefined symbol "declare"
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6637) : error 017: undefined symbol "declare"
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6639) : error 017: undefined symbol "declare"
    C:\Users\Reinhard\Desktop\Script\Legend of Life\gamemodes\Release.pwn(6640) : error 017: undefined symbol "declare"


    [pwn] strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
    strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);[/pwn]

    Das muss bei OnPlayerDeath dann aufgerufen werden.
    Das muss dann wie bei dem stock benutzt werden.
    Das ist das Problem.


    Das heisst? Ich muss das Public in das Public OnPlayerDeath reinmachen? ?(
    Und welche von den beiden Versionen wäre besser?



    Mit freundlichen Grüssen,
    FabianLP

    Guten Tag liebe sa-mp.de Community. Ich habe ein Problem, ich wollte machen das wenn man jemand tötet das man 2 Wanteds bekommt...


    forward SetPlayerCriminal(playerid,declare,reason[]);
    public SetPlayerCriminal(playerid,declare,reason[])
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pJailed] == 0)
    {
    PlayerInfo[playerid][pCrimes] += 1;
    new points = WantedPoints[playerid];
    new turned[MAX_PLAYER_NAME];
    new turner[MAX_PLAYER_NAME];
    new turnmes[128];
    new wantedmes[128];
    new wlevel;
    strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
    GetPlayerName(playerid, turned, sizeof(turned));
    if (declare == 255)
    {
    format(turner, sizeof(turner), "Unbekannt");
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    }
    else
    {
    if(IsPlayerConnected(declare))
    {
    GetPlayerName(declare, turner, sizeof(turner));
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
    strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
    }
    }
    format(turnmes, sizeof(turnmes), "Du hast ein Verbrechen begangen ( %s ). Reporter: %s.",reason,turner);
    SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
    if(points > 0)
    {
    new yesno;
    if(points == 2) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }
    else if(points >= 3 && points <= 4) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1; } }
    else if(points >= 5 && points <= 6) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }
    else if(points >= 7 && points <= 8) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }
    else if(points >= 9 && points <= 10) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }
    else if(points >= 11 && points <= 12) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }
    else if(points >= 13 && points <= 14) { if(WantedLevel[playerid] != 7) { WantedLevel[playerid] = 7; wlevel = 7; yesno = 1; } }
    else if(points >= 15 && points <= 16) { if(WantedLevel[playerid] != 8) { WantedLevel[playerid] = 8; wlevel = 8; yesno = 1; } }
    else if(points >= 17 && points <= 18) { if(WantedLevel[playerid] != 9) { WantedLevel[playerid] = 9; wlevel = 9; yesno = 1; } }
    else if(points >= 19 && points <= 20) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }
    else if(points >= 21 && points <= 22) { if(WantedLevel[playerid] != 11) { WantedLevel[playerid] = 11; wlevel = 11; yesno = 1; } }
    else if(points >= 23 && points <= 24) { if(WantedLevel[playerid] != 12) { WantedLevel[playerid] = 12; wlevel = 12; yesno = 1; } }
    else if(points >= 25 && points <= 26) { if(WantedLevel[playerid] != 13) { WantedLevel[playerid] = 13; wlevel = 13; yesno = 1; } }
    else if(points >= 27 && points <= 28) { if(WantedLevel[playerid] != 14) { WantedLevel[playerid] = 14; wlevel = 14; yesno = 1; } }
    else if(points >= 29 && points <= 30) { if(WantedLevel[playerid] != 15) { WantedLevel[playerid] = 15; wlevel = 15; yesno = 1; } }
    else if(points >= 31 && points <= 32) { if(WantedLevel[playerid] != 16) { WantedLevel[playerid] = 16; wlevel = 16; yesno = 1; } }
    else if(points >= 33 && points <= 34) { if(WantedLevel[playerid] != 17) { WantedLevel[playerid] = 17; wlevel = 17; yesno = 1; } }
    else if(points >= 35 && points <= 36) { if(WantedLevel[playerid] != 18) { WantedLevel[playerid] = 18; wlevel = 18; yesno = 1; } }
    else if(points >= 37 && points <= 38) { if(WantedLevel[playerid] != 19) { WantedLevel[playerid] = 19; wlevel = 19; yesno = 1; } }
    else if(points >= 39 && points <= 40) { if(WantedLevel[playerid] != 20) { WantedLevel[playerid] = 20; wlevel = 20; yesno = 1; } }
    else if(points >= 41 && points <= 42) { if(WantedLevel[playerid] != 21) { WantedLevel[playerid] = 21; wlevel = 21; yesno = 1; } }
    else if(points >= 43 && points <= 44) { if(WantedLevel[playerid] != 22) { WantedLevel[playerid] = 22; wlevel = 22; yesno = 1; } }
    else if(points >= 45 && points <= 46) { if(WantedLevel[playerid] != 23) { WantedLevel[playerid] = 23; wlevel = 23; yesno = 1; } }
    else if(points >= 47 && points <= 48) { if(WantedLevel[playerid] != 24) { WantedLevel[playerid] = 24; wlevel = 24; yesno = 1; } }
    else if(points >= 49 && points <= 50) { if(WantedLevel[playerid] != 25) { WantedLevel[playerid] = 25; wlevel = 25; yesno = 1; } }
    else if(points >= 51 && points <= 52) { if(WantedLevel[playerid] != 26) { WantedLevel[playerid] = 26; wlevel = 26; yesno = 1; } }
    else if(points >= 53 && points <= 54) { if(WantedLevel[playerid] != 27) { WantedLevel[playerid] = 27; wlevel = 27; yesno = 1; } }
    else if(points >= 55 && points <= 56) { if(WantedLevel[playerid] != 28) { WantedLevel[playerid] = 28; wlevel = 28; yesno = 1; } }
    else if(points >= 57 && points <= 58) { if(WantedLevel[playerid] != 29) { WantedLevel[playerid] = 29; wlevel = 29; yesno = 1; } }
    else if(points >= 59 && points <= 60) { if(WantedLevel[playerid] != 30) { WantedLevel[playerid] = 30; wlevel = 30; yesno = 1; } }
    else if(points >= 61 && points <= 62) { if(WantedLevel[playerid] != 31) { WantedLevel[playerid] = 31; wlevel = 31; yesno = 1; } }
    else if(points >= 63 && points <= 64) { if(WantedLevel[playerid] != 32) { WantedLevel[playerid] = 32; wlevel = 32; yesno = 1; } }
    else if(points >= 65 && points <= 66) { if(WantedLevel[playerid] != 33) { WantedLevel[playerid] = 33; wlevel = 33; yesno = 1; } }
    else if(points >= 67 && points <= 68) { if(WantedLevel[playerid] != 34) { WantedLevel[playerid] = 34; wlevel = 34; yesno = 1; } }
    else if(points >= 69 && points <= 70) { if(WantedLevel[playerid] != 35) { WantedLevel[playerid] = 35; wlevel = 35; yesno = 1; } }
    else if(points >= 71 && points <= 72) { if(WantedLevel[playerid] != 36) { WantedLevel[playerid] = 36; wlevel = 36; yesno = 1; } }
    else if(points >= 73 && points <= 74) { if(WantedLevel[playerid] != 37) { WantedLevel[playerid] = 37; wlevel = 37; yesno = 1; } }
    else if(points >= 75 && points <= 76) { if(WantedLevel[playerid] != 38) { WantedLevel[playerid] = 38; wlevel = 38; yesno = 1; } }
    else if(points >= 77 && points <= 78) { if(WantedLevel[playerid] != 39) { WantedLevel[playerid] = 39; wlevel = 39; yesno = 1; } }
    else if(points >= 79 && points <= 80) { if(WantedLevel[playerid] != 40) { WantedLevel[playerid] = 40; wlevel = 40; yesno = 1; } }
    else if(points >= 80)
    { if(WantedLevel[playerid] != 40) { WantedLevel[playerid] = 40; wlevel = 40; yesno = 1; } }
    if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }
    if(yesno)
    {
    format(wantedmes, sizeof(wantedmes), "Derzeitiges Wantedlevel: %d", wlevel);
    SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i))
    {
    format(cbjstore, sizeof(turnmes), "HQ: Alle Einheiten: Reporter: %s",turner);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    format(cbjstore, sizeof(turnmes), "HQ: Verbrechen: %s, Gesuchter: %s",reason,turned);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    }
    }
    }
    }
    }
    }
    }//not connected
    }
    Keine Warnings kein nix! Es geht aber nicht ...
    Dan hab ich noch eine 2te Version versucht...:


    //forward SetPlayerCriminal(playerid,declare,reason[]);
    public SetPlayerCriminal(playerid,declare,reason[])
    {
    if(IsPlayerConnected(playerid))
    {
    PlayerInfo[playerid][pCrimes] += 1;
    new points = WantedPoints[playerid];
    new turned[MAX_PLAYER_NAME];
    new turner[MAX_PLAYER_NAME];
    strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
    new turnme[256];
    new Wantedzahl = WantedLevel[playerid];
    format(turnme,sizeof(turnme), "Aktuelles Wantedlevel : %d",Wantedzahl);
    SendClientMessage(playerid, COLOR_YELLOW, turnme);
    GetPlayerName(playerid, turned, sizeof(turned));
    if (declare == 255)
    {
    format(turner, sizeof(turner), "Unbekannt");
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    }
    else
    {
    if(IsPlayerConnected(declare))
    {
    GetPlayerName(declare, turner, sizeof(turner));
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
    strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
    }
    }
    if(points < 40)
    {
    SetPlayerWantedLevel(playerid,points+1);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    if(OnDuty[i] == 1)
    {
    format(cbjstore, sizeof(cbjstore), "HQ: Alle Einheiten: Reporter: %s",turner);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    format(cbjstore, sizeof(cbjstore), "HQ: Verbrechen: %s, Gesuchter: %s",reason,turned);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    }
    }
    }
    }
    }//not connected
    }



    Kann mir jemand helfen? wäre echt nett von euch!




    Mit freundlichen Grüssen,
    FabianLP!