Dauerhaft CJ Skin

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

  • 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;
    }


  • 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;

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • 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;
    }