Beiträge von - Stofftrank -

    Hallo,
    ich habe den ID 0 Bug bei diesen befehl:
    if(strcmp("/startbonus", cmd, true) == 0)
    {
    new giveplayerid;
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "INFO: /startbonus [playerid]");
    return 1;
    }
    if(SpielerInfo[playerid][Admin] >= 1)
    {
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(SpielerInfo[giveplayerid][Level]>=3)
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist kein Anfänger mehr.");
    return 1;
    }
    else
    {
    format(string,sizeof(string), "[ADMIN] %s hat dir einen Startbonus gegeben (lvl 3 + 50k$).", SpielerName(playerid));
    SendClientMessage(giveplayerid, COLOR_BLUE, string);
    format(string,sizeof(string), "[ADMIN] Du hast %s einen Startbonus gegeben.", SpielerName(giveplayerid));
    SendClientMessage(playerid, COLOR_BLUE, string);
    GivePlayerMoney(giveplayerid, 50000);
    SpielerInfo[giveplayerid][Level]=3;
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin.");
    }
    }
    return 1;
    }


    Mfg

    forward paydaydraw(playerid);
    public paydaydraw(playerid)
    {
    new paydaystring[100];
    format(paydaystring, sizeof(paydaystring),"Payday: %d/60 Minuten", SpielerInfo[playerid][Paytime]);
    PlayerTextDrawSetString(playerid, paydayzeit[playerid], paydaystring);
    return 1;
    }


    paydayzeit[playerid] = CreatePlayerTextDraw(playerid, 256.799957, 7.466705, "PayDay: 00/60");
    PlayerTextDrawLetterSize(playerid, paydayzeit[playerid], 0.367599, 1.114666);
    PlayerTextDrawAlignment(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawColor(playerid, paydayzeit[playerid], -1);
    PlayerTextDrawSetShadow(playerid, paydayzeit[playerid], 0);
    PlayerTextDrawSetOutline(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, paydayzeit[playerid], 51);
    PlayerTextDrawFont(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawSetProportional(playerid, paydayzeit[playerid], 1);


    public OnPlayerSpawn(playerid)
    {
    paydaydraw(playerid);
    PlayerTextDrawShow(playerid, paydayzeit[playerid]); //Das kannst du auch in den paydaydraw(playerid) packen, wie du willst


    public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
    {
    paydaydraw(playerid);
    PlayerTextDrawShow(playerid, paydayzeit[playerid]); //Das kannst du auch in den paydaydraw(playerid) packen, wie du willst


    public OnPlayerExitVehicle(playerid,vehicleid)
    {
    paydaydraw(playerid);
    PlayerTextDrawShow(playerid, paydayzeit[playerid]); //Das kannst du auch in den paydaydraw(playerid) packen, wie du willst



    Mfg

    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(58717) : warning 235: public function lacks forward declaration (symbol "paydaydraw")
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(58720) : warning 213: tag mismatch
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(58720) : error 017: undefined symbol "pID"
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(58721) : error 035: argument type mismatch (argument 1)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    new PlayerText:paydayzeit[MAX_PLAYERS];


    public paydaydraw(playerid)
    {
    new paydaystring[100];
    format(paydayzeit, sizeof paydayzeit,"{0091FF}Payday: {FEFEFE}%s{0091FF}/60",SpielerInfo[pID][Paytime]," Minuten");
    TextDrawSetString(paydayzeit, paydaystring);
    }


    paydayzeit[playerid] = CreatePlayerTextDraw(playerid, 256.799957, 7.466705, "PayDay: 00/60");
    PlayerTextDrawLetterSize(playerid, paydayzeit[playerid], 0.367599, 1.114666);
    PlayerTextDrawAlignment(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawColor(playerid, paydayzeit[playerid], -1);
    PlayerTextDrawSetShadow(playerid, paydayzeit[playerid], 0);
    PlayerTextDrawSetOutline(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, paydayzeit[playerid], 51);
    PlayerTextDrawFont(playerid, paydayzeit[playerid], 1);
    PlayerTextDrawSetProportional(playerid, paydayzeit[playerid], 1);

    hallo,
    ich wollte ein Anti Bunnyhop System einfügen aber es kam beim einruckeln ein error udn ein Warning
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(56853) : warning 209: function "OnPlayerKeyStateChange" should return a value
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(56854) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    if(PRESSED(KEY_CROUCH))
    {
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
    if(GetPVarInt(playerid, "CBugCheck") == 1 && (GetPlayerWeaponSlot(playerid) == 2 || GetPlayerWeaponSlot(playerid) == 3 || GetPlayerWeaponSlot(playerid) == 6))
    {
    SafeKillTimer(cbugtimer[playerid]);
    SetPVarInt(playerid, "CBugCheck", 0);
    GivePVarInt(playerid, "CBugWarnings", 1);
    if(GetPVarInt(playerid, "CBugWarnings") == 4)
    {
    SendClientMessageToAllF(DRED, "%s(%d) wurde wegen c-bugging gekickt.", ReturnPlayerName(playerid), playerid);
    Create1VarTimerEx(kicktimer[playerid], "KickPlayer", 500, false, "d", playerid);
    }
    else if(GetPVarInt(playerid, "CBugWarnings") < 4)
    {
    SafeKillTimer(cbugcooldowntimer[playerid]);
    CreateVarTimerEx(cbugcooldowntimer[playerid], "CBugCoolDown", 10000, false, "d", playerid);
    SendClientMessage(playerid, DRED, "C-bugge nicht wieder, sonst wirst du gekickt!");
    //Hier kann man noch eine Nachricht für nur Admins einfügen.
    //Beispiel: SendClientMessageToAdminsF(DRED, "%s(%d) wurde beim c-buggen erwischt.", ReturnPlayerName(playerid), playerid);
    }
    }
    }
    }
    if(PRESSED(KEY_FIRE)) //Kann ausgeführt werden, während man die Feuer Taste gedrückt hält
    {
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
    if(GetPlayerWeaponSlot(playerid) == 2 || GetPlayerWeaponSlot(playerid) == 3 || GetPlayerWeaponSlot(playerid) == 6)
    {
    SafeKillTimer(cbugtimer[playerid]);
    SetPVarInt(playerid, "CBugCheck", 1);
    CreateVarTimerEx(cbugtimer[playerid], "UnCheckPlayerCBug", 300, false, "d", playerid);
    }
    }
    }
    if(RELEASED(KEY_FIRE)) //Kann ausgeführt werden, während man die Feuer Taste losgelassen hat.
    {
    SetPVarInt(playerid, "IsShooting", 0);
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
    if(GetPlayerWeaponSlot(playerid) == 2 || GetPlayerWeaponSlot(playerid) == 3 || GetPlayerWeaponSlot(playerid) == 6)
    {
    SafeKillTimer(cbugtimer[playerid]);
    SetPVarInt(playerid, "CBugCheck", 1);
    CreateVarTimerEx(cbugtimer[playerid], "UnCheckPlayerCBug", 300, false, "d", playerid);
    }
    }
    }
    }
    return 1;
    }


    Mfg

    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(58505) : warning 208: function with tag result used before definition, forcing reparse


    }
    stock Float:GetDistanceBetweenPoints(Float:X, Float:Y, Float:Z, Float:PointX, Float:PointY, Float:PointZ) return floatsqroot(floatpower(floatsub(X, PointX), 2.0) + floatpower(floatsub(Y, PointY), 2.0) + floatpower(floatsub(Z, PointZ), 2.0));
    public ProxDetectorS(Float:radi, playerid, targetid)
    {


    und ich möchtem ich für so viele themen entschuldigen.


    Mfg

    ______________________________
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(48473) : warning 219: local variable "ID" shadows a variable at a preceding level


    if(dialogid == inviteD)
    {
    if(response == 0)
    {
    SendClientMessage(playerid,Rot,"Du hast den Vorgang abgebrochen");
    }
    if(response == 1)
    {
    if(strlen(inputtext))
    {
    ------->new ID = ReturnUser(inputtext);
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,Rot,"Diese ID exestiert nicht!");
    if(ID == playerid) return SendClientMessage(playerid,Rot,"Du kannst dich nicht selbst Inviten!");
    if(SpielerInfo[ID][Eingeloggt]==1)
    {
    if(SpielerInfo[ID][Frakt]!=0)return ErrorMsg(playerid,"Der Spieler ist noch in einer anderen Fraktion.");
    new text[128];
    // new query[80];
    //new data[256];
    format(query,sizeof(query),"SELECT Name FROM fraktionen WHERE id='%i'",SpielerInfo[playerid][Frakt]);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows()==0)
    {
    mysql_free_result();
    return SendClientMessage(playerid,Rot,"FATAL Faction system Error : Datei nicht gefunden!");
    }
    mysql_fetch_field("Name",data);
    format(text,sizeof(text),"{FFFFFF}Du wurdest in die Fraktion {FF0000}%s {FFFFFF}eingeladen \n Möchtest du dieser Fraktion beitreten ?",data);
    ShowPlayerDialog(ID,inviteB,0,"Fraktion",text,"Ja","Nein");
    return 1;
    }
    SendClientMessage(playerid,COLOR_WHITE,"Spieler ist nicht eingeloggt.");
    return 1;


    }
    else
    {
    SendClientMessage(playerid,Rot,"Die ID muss eine Zahl sein!");
    }
    }
    }

    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(30528) : warning 219: local variable "money" shadows a variable at a preceding level
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(30528) : warning 204: symbol is assigned a value that is never used: "money"


    if(strcmp("/givemoney", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new giveplayerid;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [playerid] [betrag]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [playerid] [betrag]");
    return 1;
    }
    new money = strval(tmp);<<<<<<----------------
    if(SpielerInfo[playerid][Admin] >= 6)
    {
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GibGeld(giveplayerid, money);
    format(string, sizeof(string), "[ADMIN] %s hat %s Geld gegeben. Betrag: %s$", SpielerName(playerid), SpielerName(giveplayerid),money);
    SendClientMessage(COLOR_BLUE, 1, string);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin.");
    }
    }
    return 1;
    }


    Was muss ich tuhn?


    mfg

    Naja.
    Für uns sieht es aus als were das Vertragslaufzeit nichts.
    Es sieht aus als müsste man trotzdem jeden MOnat das gleiche zahlen obwohl man schon für längere Zeit den Ts gemietet hat.


    mfg