/clothes 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
  • Hi... Ich habe nen Problem mit /clothes.


    Man kann überall /clothes machen, und sogar die Skins von der Polizei wählen, ohne dass man da drin ist!
    Wie kann ich das ändern ?! Normal müsste es doch nur an bestimmten Orten gehen ?! Und dann wenn man immer "weiter", "zurück" und "fertig" sagt ?!


    Schaut mal an:



    /clothes:



    if(strcmp(cmd, "/clothes", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] >= 1)
    {
    if(IsAtClothShop(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 2) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 3) { ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
    else if(PlayerInfo[playerid][pMember] == 4) { ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
    else if(PlayerInfo[playerid][pMember] == 5) { ChosenSkin[playerid] = 258; SetPlayerSkin(playerid, 120); }
    else if(PlayerInfo[playerid][pMember] == 6) { ChosenSkin[playerid] = 294; SetPlayerSkin(playerid, 294); }
    else if(PlayerInfo[playerid][pMember] == 7) { ChosenSkin[playerid] = 164; SetPlayerSkin(playerid, 164); }
    else if(PlayerInfo[playerid][pMember] == 8) { ChosenSkin[playerid] = 250; SetPlayerSkin(playerid, 250); }
    else if(PlayerInfo[playerid][pMember] == 9) { ChosenSkin[playerid] = 187; SetPlayerSkin(playerid, 187); }
    else if(PlayerInfo[playerid][pMember] == 10) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else if(PlayerInfo[playerid][pMember] == 11) { ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); }
    else if(PlayerInfo[playerid][pMember] == 12) { ChosenSkin[playerid] = 247; SetPlayerSkin(playerid, 247); }//Hells Angels
    else if(PlayerInfo[playerid][pMember] == 13) { ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }//Grove Street
    else if(PlayerInfo[playerid][pMember] == 14) { ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }//Ballas
    else if(PlayerInfo[playerid][pMember] == 15) { ChosenSkin[playerid] = 185; SetPlayerSkin(playerid, 185); }//2Fast2Furios
    else if(PlayerInfo[playerid][pMember] == 16) { ChosenSkin[playerid] = 108; SetPlayerSkin(playerid, 108); }//Los Santos Vagos
    else if(PlayerInfo[playerid][pMember] == 17) { ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); }//Varios Los Aztecas
    else if(PlayerInfo[playerid][pMember] == 18) { ChosenSkin[playerid] = 173; SetPlayerSkin(playerid, 173); }//San Fiero Rifa
    else if(PlayerInfo[playerid][pMember] == 19) { ChosenSkin[playerid] = 234; SetPlayerSkin(playerid, 234); }//West Coust Customs
    else if(PlayerInfo[playerid][pMember] == 20) { ChosenSkin[playerid] = 220; SetPlayerSkin(playerid, 220); }
    else if(PlayerInfo[playerid][pMember] == 21) { ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
    else if(PlayerInfo[playerid][pMember] == 22) { ChosenSkin[playerid] = 277; SetPlayerSkin(playerid, 277); }
    else if(PlayerInfo[playerid][pMember] == 23) { ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
    else if(PlayerInfo[playerid][pMember] == 24) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else { return 1; }
    GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
    ChangePos2[playerid][0] = GetPlayerInterior(playerid);
    ChangePos2[playerid][1] = 1;
    SetPlayerInterior(playerid,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(playerid);
    SelectChar[playerid] = 255;
    SelectCharID[playerid] = PlayerInfo[playerid][pMember];
    SelectCharPlace[playerid] = 1;
    PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
    PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Gib 'weiter' ein um den Charakter auszusuchen den du gerne nutzen möchtest.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keinem Bekleidungsgeschäft !");
    return 1;
    }
    }
    else
    {//22(50),29(30),23(35)
    AtClothes[playerid] = 1;
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, 0);
    return 1;
    }
    }
    return 1;
    }


    Findet ihr Fehler ?!

    Greetz,
    LuX

  • So:


    if(strcmp(cmd, "/clothes", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] >= 1)
    {
    IsPlayerInRangeOfPoint(playerid, X, Y, Z);
    {
    if(IsAtClothShop(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 2) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 3) { ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
    else if(PlayerInfo[playerid][pMember] == 4) { ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
    else if(PlayerInfo[playerid][pMember] == 5) { ChosenSkin[playerid] = 258; SetPlayerSkin(playerid, 120); }
    else if(PlayerInfo[playerid][pMember] == 6) { ChosenSkin[playerid] = 294; SetPlayerSkin(playerid, 294); }
    else if(PlayerInfo[playerid][pMember] == 7) { ChosenSkin[playerid] = 164; SetPlayerSkin(playerid, 164); }
    else if(PlayerInfo[playerid][pMember] == 8) { ChosenSkin[playerid] = 250; SetPlayerSkin(playerid, 250); }
    else if(PlayerInfo[playerid][pMember] == 9) { ChosenSkin[playerid] = 187; SetPlayerSkin(playerid, 187); }
    else if(PlayerInfo[playerid][pMember] == 10) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else if(PlayerInfo[playerid][pMember] == 11) { ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); }
    else if(PlayerInfo[playerid][pMember] == 12) { ChosenSkin[playerid] = 247; SetPlayerSkin(playerid, 247); }//Hells Angels
    else if(PlayerInfo[playerid][pMember] == 13) { ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }//Grove Street
    else if(PlayerInfo[playerid][pMember] == 14) { ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }//Ballas
    else if(PlayerInfo[playerid][pMember] == 15) { ChosenSkin[playerid] = 185; SetPlayerSkin(playerid, 185); }//2Fast2Furios
    else if(PlayerInfo[playerid][pMember] == 16) { ChosenSkin[playerid] = 108; SetPlayerSkin(playerid, 108); }//Los Santos Vagos
    else if(PlayerInfo[playerid][pMember] == 17) { ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); }//Varios Los Aztecas
    else if(PlayerInfo[playerid][pMember] == 18) { ChosenSkin[playerid] = 173; SetPlayerSkin(playerid, 173); }//San Fiero Rifa
    else if(PlayerInfo[playerid][pMember] == 19) { ChosenSkin[playerid] = 234; SetPlayerSkin(playerid, 234); }//West Coust Customs
    else if(PlayerInfo[playerid][pMember] == 20) { ChosenSkin[playerid] = 220; SetPlayerSkin(playerid, 220); }
    else if(PlayerInfo[playerid][pMember] == 21) { ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
    else if(PlayerInfo[playerid][pMember] == 22) { ChosenSkin[playerid] = 277; SetPlayerSkin(playerid, 277); }
    else if(PlayerInfo[playerid][pMember] == 23) { ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
    else if(PlayerInfo[playerid][pMember] == 24) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else { return 1; }
    GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
    ChangePos2[playerid][0] = GetPlayerInterior(playerid);
    ChangePos2[playerid][1] = 1;
    SetPlayerInterior(playerid,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(playerid);
    SelectChar[playerid] = 255;
    SelectCharID[playerid] = PlayerInfo[playerid][pMember];
    SelectCharPlace[playerid] = 1;
    PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
    PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Gib 'weiter' ein um den Charakter auszusuchen den du gerne nutzen möchtest.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keinem Bekleidungsgeschäft !");
    return 1;
    }
    }
    else
    {//22(50),29(30),23(35)
    AtClothes[playerid] = 1;
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, 0);
    return 1;
    }
    }
    return 1;
    }
    }


    Weiß nicht ob ganz richtig ist :)


    Mfg Andy

    Du suchst ein Scripter der für "maximal" 5€ für dich Scriptet?


    Dann bist du bei mir genau richtig.

  • Ich kann bis hier her riechen, dass das das LoH Script ist, so die Fraktions-Namen :P

  • jup und dort ist auch der selbe fehler ^^
    das überall /clothes geht :D


    Das nicht überall /clothes geht müsstest du es so machen:
    if(strcmp(cmd, "/clothes", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsAtClothShop(playerid))
    {
    if(PlayerInfo[playerid][pMember] >= 1)
    {
    if(PlayerInfo[playerid][pMember] == 1) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 2) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
    else if(PlayerInfo[playerid][pMember] == 3) { ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
    else if(PlayerInfo[playerid][pMember] == 4) { ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
    else if(PlayerInfo[playerid][pMember] == 5) { ChosenSkin[playerid] = 258; SetPlayerSkin(playerid, 120); }
    else if(PlayerInfo[playerid][pMember] == 6) { ChosenSkin[playerid] = 294; SetPlayerSkin(playerid, 294); }
    else if(PlayerInfo[playerid][pMember] == 7) { ChosenSkin[playerid] = 164; SetPlayerSkin(playerid, 164); }
    else if(PlayerInfo[playerid][pMember] == 8) { ChosenSkin[playerid] = 250; SetPlayerSkin(playerid, 250); }
    else if(PlayerInfo[playerid][pMember] == 9) { ChosenSkin[playerid] = 187; SetPlayerSkin(playerid, 187); }
    else if(PlayerInfo[playerid][pMember] == 10) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else if(PlayerInfo[playerid][pMember] == 11) { ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); }
    else if(PlayerInfo[playerid][pMember] == 12) { ChosenSkin[playerid] = 247; SetPlayerSkin(playerid, 247); }//Hells Angels
    else if(PlayerInfo[playerid][pMember] == 13) { ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }//Grove Street
    else if(PlayerInfo[playerid][pMember] == 14) { ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }//Ballas
    else if(PlayerInfo[playerid][pMember] == 15) { ChosenSkin[playerid] = 185; SetPlayerSkin(playerid, 185); }//2Fast2Furios
    else if(PlayerInfo[playerid][pMember] == 16) { ChosenSkin[playerid] = 108; SetPlayerSkin(playerid, 108); }//Los Santos Vagos
    else if(PlayerInfo[playerid][pMember] == 17) { ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); }//Varios Los Aztecas
    else if(PlayerInfo[playerid][pMember] == 18) { ChosenSkin[playerid] = 173; SetPlayerSkin(playerid, 173); }//San Fiero Rifa
    else if(PlayerInfo[playerid][pMember] == 19) { ChosenSkin[playerid] = 234; SetPlayerSkin(playerid, 234); }//West Coust Customs
    else if(PlayerInfo[playerid][pMember] == 20) { ChosenSkin[playerid] = 220; SetPlayerSkin(playerid, 220); }
    else if(PlayerInfo[playerid][pMember] == 21) { ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
    else if(PlayerInfo[playerid][pMember] == 22) { ChosenSkin[playerid] = 277; SetPlayerSkin(playerid, 277); }
    else if(PlayerInfo[playerid][pMember] == 23) { ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
    else if(PlayerInfo[playerid][pMember] == 24) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
    else { return 1; }
    GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
    ChangePos2[playerid][0] = GetPlayerInterior(playerid);
    ChangePos2[playerid][1] = 1;
    SetPlayerInterior(playerid,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(playerid);
    SelectChar[playerid] = 255;
    SelectCharID[playerid] = PlayerInfo[playerid][pMember];
    SelectCharPlace[playerid] = 1;
    PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
    PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Gib 'weiter' ein um den Charakter auszusuchen den du gerne nutzen möchtest.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
    }
    else
    {
    AtClothes[playerid] = 1;
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, 0);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keinem Bekleidungsgeschäft !");
    return 1;
    }
    }
    return 1;
    }


    Und die Skins kannst du unter new Peds
    einstellen.


    Einfach mal im Script nach new Peds suchen ^^ da siehst du dan alle Skin Ids


    Mfg
    Picaso

  • Menü schauste mal mit der SuFu in den Tutorial Bereich und gibst ein "Dialog Tut" oder suchst einfach.


    Das ist 100% das LoH Script xP habs ja selbst und da stehst genau so drinne^^

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25