Useful Callbacks gesucht!

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 zusammen,
    ich suche das Include UsefulCallbacks (kurz: uc.inc)
    Ich bin bei der suche schoneinmal auf einen Pastebineintrag gestoßen. Ich kopierte dies, bekam jedoch 26 Fehler.


    Die Fehler:
    C:\Users\Alex\Desktop\pawno\include\uc.inc(121) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(33) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(34) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(34) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(35) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(35) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(36) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(36) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(37) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(37) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(38) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(38) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(39) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(39) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\Alex\Desktop\pawno\include\uc.inc(63) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(64) : error 017: undefined symbol "IsPlayerConnected"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(65) : error 017: undefined symbol "GetPlayerHealth"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(66) : error 017: undefined symbol "GetPlayerArmour"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(67) : warning 213: tag mismatch
    C:\Users\Alex\Desktop\pawno\include\uc.inc(68) : warning 213: tag mismatch
    C:\Users\Alex\Desktop\pawno\include\uc.inc(72) : error 004: function "OnPlayerGetHealth" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(76) : error 004: function "OnPlayerLoseHealth" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(80) : error 004: function "OnPlayerGetArmour" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(84) : error 004: function "OnPlayerLoseArmour" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(88) : error 004: function "OnPlayerGetMoney" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(92) : error 004: function "OnPlayerLoseMoney" is not implemented
    C:\Users\Alex\Desktop\pawno\include\uc.inc(95) : error 017: undefined symbol "GetPlayerState"
    C:\Users\Alex\Desktop\pawno\include\uc.inc(97) : error 017: undefined symbol "PLAYER_STATE_DRIVER"

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

    Die Fehler:
    26 Errors.


    Der Code:
    ///////////////////////////
    //Useful Callbacks/////UC//
    ///////////////////////////
    ///Copyright by Rafelder///
    ///////////////////////////

    /*#if defined _UC_included
    #endinput
    #endif

    #define _UC_included
    #pragma library UC*/

    forward OnPlayerGetHealth(playerid, health);
    forward OnPlayerLoseHealth(playerid, health);
    forward OnPlayerGetArmour(playerid, armour);
    forward OnPlayerLoseArmour(playerid, armour);
    forward OnPlayerGetMoney(playerid, money);
    forward OnPlayerLoseMoney(playerid, money);
    forward OnPlayerGetScore(playerid, score);
    forward OnPlayerLoseScore(playerid, score);
    forward OnPlayerGetWantedLevel(playerid, wantedlevel);
    forward OnPlayerLoseWantedLevel(playerid, wantedlevel);
    forward OnPlayerCangeToVehicle(playerid, vehicleid, driver);
    forward OnPlayerChangeToFoot(playerid);
    forward OnPlayerSwitchWeapon(playerid, oldweapon, newweapon);
    forward OnPlayerPressKey(playerid, key);
    forward OnPlayerPressMoveKey(playerid, key);

    #define ONFOOT 1
    #define DRIVER 2
    #define PASSENGER 3
    new Float:healthp[MAX_PLAYERS];
    new Float:armourp[MAX_PLAYERS];
    new moneyp[MAX_PLAYERS];
    new gstate[MAX_PLAYERS];
    new weaponp[MAX_PLAYERS];
    new scorep[MAX_PLAYERS];
    new wantedl[MAX_PLAYERS];
    forward Callbacktimer();

    stock AddCallbacks()
    {
    SetTimer("Callbacktimer", 100, 1);
    }

    stock RemoveCallbackStats(playerid)
    {
    healthp[playerid]=100;
    armourp[playerid]=100;
    moneyp[playerid]=0;
    gstate[playerid]=ONFOOT;
    weaponp[playerid]=0;
    scorep[playerid]=0;
    wantedl[playerid]=0;
    return 1;
    }

    public Callbacktimer()
    {
    new Float:h, Float:a;
    new m, statep;
    for (new i=0; i<MAX_PLAYERS; i++) {
    if (IsPlayerConnected(i)) {
    GetPlayerHealth(i, h);
    GetPlayerArmour(i, a);
    if (h == 0) {
    healthp[i]=0;
    weaponp[i]=0;
    }
    if (h > healthp[i]) {
    OnPlayerGetHealth(i, floatround(h-healthp[i]));
    healthp[i]=h;
    }
    if (h < healthp[i]) {
    OnPlayerLoseHealth(i,floatround(healthp[i]-h));
    healthp[i]=h;
    }
    if (a > armourp[i]) {
    OnPlayerGetArmour(i, floatround(a-armourp[i]));
    armourp[i]=a;
    }
    if (a < armourp[i]) {
    OnPlayerLoseArmour(i, floatround(armourp[i]-a));
    armourp[i]=a;
    }
    if (m > moneyp[i]) {
    OnPlayerGetMoney(i, m-moneyp[i]);
    moneyp[i]=m;
    }
    if (m < moneyp[i]) {
    OnPlayerLoseMoney(i, moneyp[i]-m);
    moneyp[i]=m;
    }
    statep = GetPlayerState(i);
    if (statep != gstate[i]) {
    if (statep == PLAYER_STATE_DRIVER) OnPlayerCangeToVehicle(i, GetPlayerVehicleID(i), 1), gstate[i]=DRIVER;
    if (statep == PLAYER_STATE_PASSENGER) OnPlayerCangeToVehicle(i, GetPlayerVehicleID(i), 0), gstate[i]=PASSENGER;
    if (statep == PLAYER_STATE_ONFOOT) OnPlayerChangeToFoot(i), gstate[i]=ONFOOT;
    }
    if (GetPlayerWeapon(i) != weaponp[i]) {
    OnPlayerSwitchWeapon(i, weaponp[i], GetPlayerWeapon(i));
    weaponp[i]=GetPlayerWeapon(i);
    }
    if (GetPlayerScore(i) > scorep[i]) {
    OnPlayerGetScore(i, GetPlayerScore(i)-scorep[i]);
    scorep[i]=GetPlayerScore(i);
    }
    if (GetPlayerScore(i) < scorep[i]) {
    OnPlayerLoseScore(i, scorep[i]-GetPlayerScore(i));
    scorep[i]=GetPlayerScore(i);
    }
    if (GetPlayerWantedLevel(i) > wantedl[i]) {
    OnPlayerGetWantedLevel(i, GetPlayerWantedLevel(i)-wantedl[i]);
    wantedl[i]=GetPlayerWantedLevel(i);
    }
    if (GetPlayerWantedLevel(i) < wantedl[i]) {
    OnPlayerLoseWantedLevel(i, wantedl[i]-GetPlayerWantedLevel(i));
    wantedl[i]=GetPlayerWantedLevel(i);
    }
    new keys, updown, leftright;
    GetPlayerKeys(i, keys, updown, leftright);
    if (keys > 0 && keys != KEY_UP && keys != KEY_DOWN && keys != KEY_LEFT && keys != KEY_RIGHT) {
    OnPlayerPressKey(i, keys);
    }
    if (keys == KEY_UP || keys == KEY_DOWN || keys == KEY_LEFT || keys == KEY_RIGHT) {
    OnPlayerPressMoveKey(i, keys);
    }
    }
    }
    }



    Ich bitte um mithilfe.
    LG
    Alex


    Edits:
    Format geändert_