Skinauswahl Problem

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 habe folgendes Problem:
    Wenn man bei mir stirbst kommt man in die Skinauswahl zurück obwohl man nicht F4 gedrückt hat.
    Also ich habe keine SKins in der Skinauswahl sondern wenn man rein kommt muss man wieder Spawn drücken.
    Kann mir vllt einer zeigen wie ich das weg mach also poste mal meine OnPlayerRequestClass:
    public OnPlayerRequestClass(playerid, classid)




    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
    ClearChatbox(playerid, 10);
    SendClientMessage(playerid, COLOR_GREEN, " ~ Willkommen bei German San Andreas! ~");
    SendClientMessage(playerid, COLOR_RED, " Benutze maximal 20 Buchstaben als Nickname, sonst wird er nicht gespeichert! ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, " ");
    if (gPlayerAccount[playerid] != 0)
    {
    new loginstring[128];
    new loginname[64];
    GetPlayerName(playerid,loginname,sizeof(loginname));
    format(loginstring,sizeof(loginstring),"Willkommen, %s\nDieser Nickname ist registriert\nDu kannst dich jetzt einloggen:",loginname);
    ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
    }
    else
    {
    gPlayerAccount[playerid] = 0;
    new regstring[128];
    new regname[64];
    GetPlayerName(playerid,regname,sizeof(regname));
    format(regstring,sizeof(regstring),"Willkommen, %s\nDu hast keinen Account.\nBitte registrieren:",regname);
    ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
    }
    //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];


    Wäre gut wenn mir einer zeigen könnte wie ich ein Krankenhaussystem mache das er zb 1 min im Krankenhaus sitzt
    Danke
    Gruß
    Black_Pain

  • public OnPlayerDeath(playerid, killerid, reason)
    {
    new name[MAX_PLAYER_NAME];
    new string[256];
    //new dmessage[128];
    //new deathreason[20];
    new playercash;
    new victimteam;
    new Float:px,Float:py,Float:pz;
    new killerteam;


    victimteam = gTeam[playerid];
    killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    GetPlayerPos(playerid, px, py, pz);
    if(killerid != 255)
    {
    if(GetPlayerState(killerid) == 2)
    {
    if(ProxDetectorS(20, killerid, playerid))
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
    {
    SendClientMessage(killerid, COLOR_YELLOW, "Das war ein Driveby-Kill. Missbrauche das nicht!");
    return 1;
    }
    SetPlayerCriminal(killerid,255,"Manslaughter");
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
    return 1;
    }
    }
    }
    }
    if (PlayerInfo[killerid][pAdmin] < 1)
    {
    if(reason == 38)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a [%d]%s with minigun.",killerid,kickname,playerid,name);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    //Ban(killerid);
    }
    }
    if(reason == 35)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with a flamethrower and has been IP banned.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    Ban(killerid);
    }
    }
    if(reason == 9)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with a chainsaw and has been IP banned.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    Ban(killerid);
    }
    }
    if(reason == 16)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with grenades and has been IP banned.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    Ban(killerid);
    }
    }
    if(reason == 18)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with molotovs and has been IP banned.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    Ban(killerid);
    }
    }
    if(reason == 28)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with a Mac 10, Check him immediately.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    }
    }
    if(reason == 32)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with Tec 9's, Check him immediately.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    }
    }
    if(reason == 36)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "[ADMIN] [%d]%s just killed a player with a Lock On Launcher and has been IP banned.",killerid,kickname);
    ABroadCast(COLOR_LIGHTRED,string,1);
    printf("%s", kstring);
    Ban(killerid);
    }
    }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Verbindung unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    ClearCrime(playerid);
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {
    format(string, sizeof(string), "* %s führt mit %d Kills.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;