Beiträge von The Sensei

    ist jetzt so stock Ban
    {
    new name[MAX_PLAYER_NAME], ban[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(ban,sizeof(ban),"/bann/%s.txt",name);
    dini_Create(ban);
    dini_Set(ban"Banns",ban);
    return 1;
    }


    Fehler Codes.
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(166) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(189) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(189) : warning 219: local variable "pfad" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(261) : warning 217: loose indentation
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(312) : warning 202: number of arguments does not match definition
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(480) : warning 209: function "ocmd_ban" should return a value
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(481) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(492) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(523) : warning 202: number of arguments does not match definition
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(785) : error 021: symbol already defined: "Ban"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(786) : error 021: symbol already defined: "ban"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(789) : error 021: symbol already defined: "dini_Create"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(790) : error 021: symbol already defined: "dini_Set"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(790) : warning 215: expression has no effect
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(790) : warning 215: expression has no effect
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(790) : error 001: expected token: ";", but found ")"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(791) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(797) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(811) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(838) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(863) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(893) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(1087) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(1244) : warning 203: symbol is never used: "ban"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(1244) : warning 203: symbol is never used: "name"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    7 Errors.

    HHahhaa sag was ich eingeben muss bzw. hab ich schon versucht.


    //e habe nun was probiert.


    new name[MAX_PLAYER_NAME], ban[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(Bann,sizeof(Bann),"/bann/%s.txt",name);
    dini_IntSet(ban,"Bann",SetPVarInt(playerid,"Baned"));
    das hab ich versucht zu scripten.


    bzw. einen Neuen Stock
    stock Bann(playerid,key[])
    {
    new name[MAX_PLAYER_NAME], ban[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(Bann,sizeof(Bann),"/bann/%s.txt",name);
    dini_Create(pfad);
    dini_set(ban,"Bann",SetPVarInt(playerid,"Baned");
    return 1;
    }


    und bei /ban


    ocmd:ban(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Rang zu Niedrig.");
    new pID, reason[128],string[128];
    if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,GELB,"/ban [id] [grund]");
    format(string,sizeof(string),"AdmCmd: %s wurde von %s gebannt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
    SendClientMessageToAll(ROT,string);
    SetPVarInt(pID,"Baned",1);
    Kick(pID);
    new name[MAX_PLAYER_NAME], ban[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(Bann,sizeof(Bann),"/bann/%s.txt",name);
    dini_IntSet(ban,"Bann",SetPVarInt(playerid,"Baned"));
    }
    return 1;
    }


    Helft mir.


    Mit Freundlichen Grüßen

    Jetzt habe ich mir Gedacht das ich das machen kann wenn der Spielerspawnt das diese Message kommt mit dem Banned aber es kommt wieder sofort Server Closet the Connection
    Code :
    public OnPlayerSpawn(playerid)
    {
    new pfad[75];
    if(GetPVarInt(playerid,"Baned"))
    if(dini_Int(pfad,"Baned") == 1)
    {
    new dialogstring[9999],header[18 + MAX_PLAYER_NAME],pID,bName[MAX_PLAYER_NAME],bgrund;
    GetPlayerName(playerid,bName,sizeof(bName));
    format(dialogstring,sizeof(dialogstring),"Guten Tag, %s ihr Account ist Gesperrt.\nSomit können sie nicht mehr mit ihm Spielen.\n\n\nAdministrator : %s\n\n\nGrund : %s\n\n\nBei Fragen bezüglichst der Sperrung wenden sie sich an den Administrator.",pID,bName,bgrund);
    format(header,sizeof(header),"Account Gesperrt %s",bName);
    ShowPlayerDialog(playerid,Stats,DIALOG_STYLE_MSGBOX,header,dialogstring,"Oke","Abbrechen");
    Kick(playerid);
    }
    return 1;
    }

    Nein wo muss das hin :
    public tkick(playerid)
    {
    Kick(playerid);
    return 1;
    }
    forward tKick(playerid); //oben
    //Da wo du kick(playerid) benutzt
    SetTimerEx("tKick",1000,0,"i",playerid);


    /////
    if(GetPVarInt(playerid,"Baned",dini_Int(pfad,"Baned")==1))
    //zu
    if(dini_Int(pfad,"Baned") == 1) // Ansonsten ist doch jeder Spieler gebannt,

    Aber nun zeigt er mir nichtmal diesen Dialog also wenn mein Acc gebannt ist und ich wieder rauf gehe steht da nur Server Closet the Conection.


    //e Nun habe ich was probiert mit der Abfrage ob er Gebannt ist nach oben zu machen also so:
    public OnPlayerConnect(playerid)
    {
    new pfad[64], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    if(dini_Exists(pfad))
    if(SetPVarInt(playerid,"Baned",dini_Int(pfad,"Baned")==1))
    {
    new dialogstring[9999],header[18 + MAX_PLAYER_NAME],pID,bName[MAX_PLAYER_NAME],bgrund;
    GetPlayerName(playerid,bName,sizeof(bName));
    format(dialogstring,sizeof(dialogstring),"Guten Tag, %s ihr Account ist Gesperrt.\nSomit können sie nicht mehr mit ihm Spielen.\n\n\nAdministrator : %s\n\n\nGrund : %s\n\n\nBei Fragen bezüglichst der Sperrung wenden sie sich an den Administrator.",pID,bName,bgrund);
    format(header,sizeof(header),"Account Gesperrt %s",bName);
    ShowPlayerDialog(playerid,Stats,DIALOG_STYLE_MSGBOX,header,dialogstring,"Oke","Abbrechen");
    Kick(playerid);
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
    }
    new string[144];
    format(string, sizeof(string),"Herzlich Willkommen auf United Deathmatch, %s",name);
    SendClientMessage(playerid,GELB,string);
    if(IsPlayerAdmin(playerid))
    {
    new pID, msg[144];
    format(msg, sizeof(msg),"Willkommen %s, du hast dich als Admin Rank %i eingeloggt.",SpielerName(playerid),GetPVarInt(pID,"Adminlevel"));
    SendClientMessage(playerid,GELB,msg);
    return 1;
    }
    Arena[playerid] = 0;
    {
    new name[MAX_PLAYER_NAME], pfad[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    }
    return 1;
    }
    Aber nun überspringt er die Registrierung und das soll so nicht sein.
    Außerdem wird mein eig. Gebannter spieler nicht gebannt.


    Mit Freundlichen Grüßen

    Guten Tag,


    Ich versuche schon seit langen ein System zu entwickeln was Spielern die Gebannt sind zeigen wer sie Gesperrt hat warum und wann.
    Mit ein bisschen Text den ich dann schreiben will bloß weiß ich nicht wie.


    vorgestellt habe ich mir das so.
    if(SetPVarInt(playerid,"Baned",dini_Int(pfad,"Baned")==1)
    {
    new dialogstring[50],header[18 + MAX_PLAYER_NAME],pID,bName[MAX_PLAYER_NAME],bgrund;
    GetPlayerName(playerid,bName,sizeof(bName));
    format(dialogstring,sizeof(dialogstring),"Guten Tag, %s ihr Account ist Gesperrt.\nSomit können sie nicht mehr mit ihm Spielen.\n\n\nAdministrator : %s\n\n\nGrund : %s\n\n\nBei Fragen bezüglichst der Sperrung wenden sie sich an den Administrator.",pID,bName,bgrund);
    format(header,sizeof(header),"Account Gesperrt %s",bName);
    ShowPlayerDialog(playerid,Stats,DIALOG_STYLE_MSGBOX,header,dialogstring,"Oke","Abbrechen");
    }
    return 1;


    Aber hab 1 Error und krieg es nicht hin :

    Errors
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(189) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(189) : warning 219: local variable "pfad" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(194) : error 001: expected token: ")", but found "{"
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(258) : warning 217: loose indentation
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(309) : warning 202: number of arguments does not match definition
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(519) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Errors
    1 Error.


    //e ich will auch das die Art da steht entweder Ingame Ban oder IP Bann oder Time Ban


    Mit Freundlichen Grüßen

    Habe jetzt diesen Fehler :
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(191) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(191) : warning 219: local variable "pfad" shadows a variable at a preceding level
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(252) : warning 217: loose indentation
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(474) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Warnings.


    public OnPlayerConnect(playerid)
    {
    new name[MAX_PLAYER_NAME], pfad[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    if(dini_Exists(pfad))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
    }
    new string[144];
    format(string, sizeof(string),"Herzlich Willkommen auf United Deathmatch, %s",name);
    SendClientMessage(playerid,GELB,string);
    if(IsPlayerAdmin(playerid))
    {
    new pID, msg[144];
    format(msg, sizeof(msg),"Willkommen %s, du hast dich als Admin Rank %i eingeloggt.",SpielerName(playerid),GetPVarInt(pID,"Adminlevel"));
    SendClientMessage(playerid,GELB,msg);
    return 1;
    }
    Arena[playerid] = 0;
    {
    new name[MAX_PLAYER_NAME], pfad[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    }
    return 1;
    }
    was ist falsch also bei unten new Name[MAX_PLAYER_NAME] etc.

    Guten Tag,
    beim laden eines Skins wird immer nur CJ gesettet.
    Why?


    public OnPlayerSpawn(playerid)
    {
    if(IsPlayerAdmin(playerid))
    {
    new pID, msg[144];
    format(msg, sizeof(msg),"Willkommen %s, du hast dich als Admin Rank %i eingeloggt.",SpielerName(playerid),GetPVarInt(pID,"Adminlevel"));
    SendClientMessage(playerid,BLAU,msg);
    return 1;
    }
    if(Arena[playerid] == 1)
    {
    SetPlayerPos(playerid,-971.8334,1089.9342,1344.9961);
    SetPlayerInterior(playerid,10);
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    return 1;
    }
    else if(Arena[playerid] == 2)
    {
    SetPlayerPos(playerid,367.3092,158.1934,1014.1875);
    SetPlayerInterior(playerid,3);
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,34,900);
    return 1;
    }
    else if(Arena[playerid] == 3)
    {
    SetPlayerPos(playerid,367.3092,158.1934,1014.1875);
    SetPlayerInterior(playerid,1);
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    return 1;
    }
    else if(Arena[playerid] == 4)
    {
    switch(random(6))
    {
    case 0: { SetPlayerPos(playerid,2223.5076,-1148.6694,1025.7969);SetPlayerInterior(playerid,15);}
    case 1: { SetPlayerPos(playerid,2238.9226,-1154.9788,1029.7969);SetPlayerInterior(playerid,15);}
    case 2: { SetPlayerPos(playerid,2250.5847,-1165.3674,1029.7969);SetPlayerInterior(playerid,15);}
    case 3: { SetPlayerPos(playerid,2238.7441,-1165.2533,1029.7969);SetPlayerInterior(playerid,15);}
    case 4: { SetPlayerPos(playerid,2227.2576,-1182.9080,1029.8043);SetPlayerInterior(playerid,15);}
    case 5: { SetPlayerPos(playerid,2199.0776,-1193.0017,1029.7969);SetPlayerInterior(playerid,15);}
    case 6: { SetPlayerPos(playerid,2193.6851,-1146.5016,1029.7969);SetPlayerInterior(playerid,15);}
    }
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    GivePlayerWeapon(playerid,30,900);
    return 1;
    }
    {
    new pfad[144];
    SetPlayerSkin(playerid,dini_Int(pfad,"Skin"));
    dini_IntSet(pfad,"Skin",GetPlayerSkin(playerid));
    }
    return 1;
    }
    stock LoadAccount(playerid)
    {
    new name[MAX_PLAYER_NAME], pfad[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(pfad,"Level"));
    GivePlayerMoney(playerid,dini_Int(pfad,"Geld"));
    SetPVarInt(playerid,"Adminlevel",dini_Int(pfad,"Adminlevel"));
    SetPVarInt(playerid,"Fraktion",dini_Int(pfad,"Fraktion"));
    SetPVarInt(playerid,"Baned",dini_Int(pfad,"Baned"));
    SetPlayerSkin(playerid,dini_Int(pfad,"Skin"));
    SetPVarInt(playerid,"Tode",dini_Int(pfad,"Tode"));
    SetPVarInt(playerid,"Kills",dini_Int(pfad,"Kills"));
    if(GetPVarInt(playerid,"Baned")==1)
    {
    SendClientMessage(playerid,ROT,"Du bist vom Server gebannt.");
    Kick(playerid);
    }
    SetPVarInt(playerid,"loggedin",1);
    return 1;
    }


    stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new name[MAX_PLAYER_NAME], pfad[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(pfad,sizeof(pfad),"/Accounts/%s.txt",name);
    dini_IntSet(pfad,"Level",GetPlayerScore(playerid));
    dini_IntSet(pfad,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(pfad,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
    dini_IntSet(pfad,"Fraktion",GetPVarInt(playerid,"Fraktion"));
    dini_IntSet(pfad,"Baned",GetPVarInt(playerid,"Baned"));
    dini_IntSet(pfad,"Skin",GetPlayerSkin(playerid));
    dini_IntSet(pfad,"timeban",GetPVarInt(playerid,"timeban"));
    dini_IntSet(pfad,"Tode",GetPVarInt(playerid,"Tode"));
    dini_IntSet(pfad,"Kills",GetPVarInt(playerid,"Kills"));
    }
    return 1;
    }


    Helft mir



    Mit Freundlichen Grüßen

    Hat funtkioniert aber kann ich die Random Spawns auch einfügen?
    Also so ungefair.
    else if(Arena[playerid] == 4)
    {
    switch(random(6))
    {
    case 0: { SetPlayerPos(playerid,2223.5076,-1148.6694,1025.7969);SetPlayerInterior(playerid,15);}
    case 1: { SetPlayerPos(playerid,2238.9226,-1154.9788,1029.7969);SetPlayerInterior(playerid,15);}
    case 2: { SetPlayerPos(playerid,2250.5847,-1165.3674,1029.7969);SetPlayerInterior(playerid,15);}
    case 3: { SetPlayerPos(playerid,2238.7441,-1165.2533,1029.7969);SetPlayerInterior(playerid,15);}
    case 4: { SetPlayerPos(playerid,2227.2576,-1182.9080,1029.8043);SetPlayerInterior(playerid,15);}
    case 5: { SetPlayerPos(playerid,2199.0776,-1193.0017,1029.7969);SetPlayerInterior(playerid,15);}
    case 6: { SetPlayerPos(playerid,2193.6851,-1146.5016,1029.7969);SetPlayerInterior(playerid,15);}
    }
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    GivePlayerWeapon(playerid,30,900);
    return 1;
    }
    return 1;

    Guten Tag,
    wie gesagt habe ich es probiert und habe diesen Code erstellt.
    public OnPlayerSpawn(playerid)
    {
    if(IsPlayerAdmin(playerid))
    {
    new pID, msg[144];
    format(msg, sizeof(msg),"Willkommen %s, du hast dich als Admin Rank %i eingeloggt.",SpielerName(playerid),GetPVarInt(pID,"Adminlevel"));
    SendClientMessage(playerid,BLAU,msg);
    return 1;
    }
    if(Arena[playerid] == 1) { //wenn arenaid vom spieler gleich 1
    SetPlayerPos(playerid,-971.8334,1089.9342,1344.9961); SetPlayerInterior(playerid,10); //setzspielerposition
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    }
    return 1;
    if(Arena[playerid] == 2) { //wenn arenaid vom spieler gleich 1
    SetPlayerPos(playerid,367.3092,158.1934,1014.1875);SetPlayerInterior(playerid,3);}
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,34,900);
    }
    return 1;
    if(Arena[playerid] == 3) { //wenn arenaid vom spieler gleich 1
    SetPlayerPos(playerid,367.3092,158.1934,1014.1875);SetPlayerInterior(playerid,1)
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    }
    return 1;
    if(Arena[playerid] == 4) { //wenn arenaid vom spieler gleich 1
    SetPlayerPos(playerid,2223.5076,-1148.6694,1025.7969);SetPlayerInterior(playerid,15);}
    SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,900);
    GivePlayerWeapon(playerid,30,900);
    return 1;
    }


    da der Fehler Code:





    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(218) : warning 225: unreachable code
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(222) : warning 209: function "OnPlayerSpawn" should return a value
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(223) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(224) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(229) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(230) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(235) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Server\gamemodes\IRP-City.pwn(457) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors.


    Danke für die Hilfe


    Mit Freundlichen Grüßen