Beiträge von Vincenzo.

    Ingame wird keine Zone angezeigt.



    new gangzone;


    Unter OnGameModeInit:

    gangzone = GangZoneCreate(1181.835, -1737.13, 1333.949, -1658.175);


    Unter OnPlayerSpawn:
    if(IsPlayerAdmin(playerid)) GangZoneShowForAll(gangzone,COLOR_LIGHTBLUE);


    Verstehe gar nicht, warum dort eine if Abfrage ist (Stand bei Wiki da)

    public OnPlayerRequestClass(playerid, classid){
    if(PlayerInfo[playerid][pSkin] == 0){
    SetPlayerVirtualWorld(playerid,playerid+1);
    SetPlayerPos(playerid, 218.3037,-98.4747,1005.2578);
    SetPlayerFacingAngle(playerid,118.6603);
    SetPlayerInterior(playerid,15);
    SetPlayerCameraPos(playerid, 216.3459,-100.0261,1005.5578);
    SetPlayerCameraLookAt(playerid, 218.3037,-98.4747,1005.2578);
    return 1;
    }else{
    SetTimerEx("PlayerSpawn",1,false,"i",playerid);
    }
    return 1;
    }


    stock Login(playerid,password[]){
    if(IsPlayerNPC(playerid)) return 1;
    new Player[64];
    format(Player,sizeof(Player),"/Accounts/%s.cfg",PlayerName(playerid));
    if(!fexist(Player)) return 1;
    DM[playerid][8] = 1;
    if(!strcmp(dini_Get(Player,"passwort"),password,true)){
    LoggedIn[playerid] = 1;
    ClearChat(playerid);
    format(PlayerInfo[playerid][pPass],128,dini_Get(Player,"Passwort"));
    PlayerInfo[playerid][pLevel] = dini_Int(Player,"Level");
    PlayerInfo[playerid][pAdminLevel] = dini_Int(Player,"Adminlevel");
    PlayerInfo[playerid][pCash] = dini_Int(Player,"Cash");
    PlayerInfo[playerid][pKills] = dini_Int(Player,"Kills");
    PlayerInfo[playerid][pDeaths] = dini_Int(Player,"Deaths");
    PlayerInfo[playerid][pKD] = dini_Int(Player,"KD");
    PlayerInfo[playerid][pSkin] = dini_Int(Player,"Skin");
    PlayerInfo[playerid][pPremium] = dini_Int(Player,"Premium");
    PlayerInfo[playerid][pSpielSekunden] = dini_Int(Player,"Spielsekunden");
    SendClientMessage(playerid,COLOR_WHITE,"SERVER: Du hast dich erfolgreich eingeloggt!");
    SendClientMessage(playerid,COLOR_WHITE,"SERVER: Deinen Skin kannst du mit /skinauswahl ändern!");
    DM[playerid][8] = 1;
    }else{
    ResetPlayer(playerid);
    SendClientMessage(playerid,COLOR_RED,"Du hast ein falsches Passwort eingegeben");
    new text[256];
    format(text,sizeof(text),"{FFFFFF}Herzlich Willkommen zurück auf LS-RP - Deathmatch, {00B700}%s {FFFFFF}!\nBitte gib unten in das Eingabefeld dein Accountpasswort ein,\num dich einzuloggen. Anschließend werden deine Accountdaten geladen.",PlayerName(playerid));
    ShowPlayerDialog(playerid,dialog_login,DIALOG_STYLE_PASSWORD,"LS-RP - Deathmatch: Authenfifizierung",text,"Login","Schließen");
    }
    SpawnPlayer(playerid);
    return 1;
    }


    if(!strcmp("/skinauswahl",cmdtext,true)){
    SkinSelection[playerid] = 1;
    PlayerInfo[playerid][pSkin] = 0;
    ForceClassSelection(playerid);
    SetPlayerHealth(playerid,0);
    return 1;


    stock Login(playerid,password[]){
    if(IsPlayerNPC(playerid)) return 1;
    new Player[64];
    format(Player,sizeof(Player),"/Accounts/%s.cfg",PlayerName(playerid));
    if(!fexist(Player)) return 1;
    DM[playerid][8] = 1;
    if(!strcmp(dini_Get(Player,"passwort"),password,true)){
    LoggedIn[playerid] = 1;
    SpawnPlayer(playerid);
    ClearChat(playerid);
    format(PlayerInfo[playerid][pPass],128,dini_Get(Player,"Passwort"));
    PlayerInfo[playerid][pLevel] = dini_Int(Player,"Level");
    PlayerInfo[playerid][pAdminLevel] = dini_Int(Player,"Adminlevel");
    PlayerInfo[playerid][pCash] = dini_Int(Player,"Cash");
    PlayerInfo[playerid][pKills] = dini_Int(Player,"Kills");
    PlayerInfo[playerid][pDeaths] = dini_Int(Player,"Deaths");
    PlayerInfo[playerid][pKD] = dini_Int(Player,"KD");
    PlayerInfo[playerid][pSkin] = dini_Int(Player,"Skin");
    PlayerInfo[playerid][pPremium] = dini_Int(Player,"Premium");
    PlayerInfo[playerid][pSpielSekunden] = dini_Int(Player,"Spielsekunden");


    stock SavePlayer(playerid){
    if(LoggedIn[playerid] == 1){
    new Player[64];
    if(IsPlayerNPC(playerid)) return 1;
    format(Player,sizeof(Player),"Accounts/%s.cfg",PlayerName(playerid));
    dini_Set(Player,"Passwort",PlayerInfo[playerid][pPass]);
    dini_IntSet(Player,"Level",PlayerInfo[playerid][pLevel]);
    dini_IntSet(Player,"Adminlevel",PlayerInfo[playerid][pAdminLevel]);
    dini_IntSet(Player,"Cash",PlayerInfo[playerid][pCash]);
    dini_IntSet(Player,"Kills",PlayerInfo[playerid][pKills]);
    dini_IntSet(Player,"Deaths",PlayerInfo[playerid][pDeaths]);
    dini_IntSet(Player,"KD",PlayerInfo[playerid][pKD]);
    dini_IntSet(Player,"Skin",PlayerInfo[playerid][pSkin]);
    dini_IntSet(Player,"Premium",PlayerInfo[playerid][pPremium]);
    dini_IntSet(Player,"Spielsekunden",PlayerInfo[playerid][pSpielSekunden]);
    }
    return 1;
    }


    stock Register(playerid,password[]){
    new Player[64];
    if(IsPlayerNPC(playerid)) return 1;
    format(Player,sizeof(Player),"Accounts/%s.cfg",PlayerName(playerid));
    dini_Create(Player);
    dini_Set(Player,"Passwort",password);
    dini_IntSet(Player,"Adminlevel",0);
    dini_IntSet(Player,"Level",1);
    dini_IntSet(Player,"Cash",0);
    dini_IntSet(Player,"Kills",0);
    dini_IntSet(Player,"Deaths",0);
    dini_IntSet(Player,"KD",0);
    dini_IntSet(Player,"Skin",101);
    dini_IntSet(Player,"Premium",0);
    dini_IntSet(Player,"Spielsekunden",0);
    return 1;
    }

    Ja, anstatt der einen format Zeile, den switch.

    Die Nachricht wird aber irgendwie nicht an alle Benutzer gesendet, und wenn ich unten aus dem SendClientMessage ein SendClientMessageToAll mache, kommt ein Error

    Das kannst du mit einem switch prüfen.
    switch(PlayerInfo[playerid][pAdminLevel]){ case 1: format(text,sizeof(text),"{FF1717}(( {FFFFFF}%s %s: %s {FF1717}))",AdminRang[PlayerInfo[playerid][pAdminLevel]],PlayerName(playerid), case 2: format(text,sizeof(text),"{F50000}(( {FFFFFF}%s %s: %s {F50000}))",AdminRang[PlayerInfo[playerid][pAdminLevel]],PlayerName(playerid),stxt);stxt); //...}

    Soll das dann in den ocmd ?

    Gut, das ist dann erledigt.
    Jetzt habe ich noch die Frage wie ich im /o Chat je nach Adminrang die (( )) farbig machen kann
    z.b.:
    (( Projektleiter EXAMPLE: Hi Jeffry ))


    code:
    ocmd:o(playerid,params[]){new text[128],stxt[98];if(sscanf(params,"s",stxt)) return SendClientMessage(playerid,COLOR_GREY,"Benutzung: /o [text]");format(text,sizeof(text),"(( %s %s: %s ))",AdminRang[PlayerInfo[playerid][pAdminLevel]],PlayerName(playerid),stxt);SendClientMessage(playerid,COLOR_WHITE,text);return 1;}


    @Jeffry


    public OnPlayerConnect(playerid)
    {
    hitSound[playerid] = false;
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Yakuza Deathmatch: Authentifizierung","Dein Account wurde in der Datenbank von Yakuza Deathmatch gefunden.\nBitte gebe nun das Passwort ein, um dich einzuloggen.","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Yakuza Deathmatch: Registration","Bitte gebe nun ein Passwort ein, um dir einen Account zu erstellen.","Registrieren","Abbrechen");
    }
    return 1;
    }


    phN:


    Ja der existiert.