/clothes Problem
#1

So I am trying to make my own clothing system that saves.. so I wanted to do this command that you can edit through it ur attached objects and put them on/off and maybe throw them away.. but something is weird ...
PS. i don't get any warnings or errors

pawn Код:
CMD:clothes(playerid,params[])
{
    if(CountAttachedObjects(playerid) == 0) return SendClientMessage(playerid,COLOR_RED,"Error: {FFFFFF}You Don't Have Any Clothes.");
    ShowPlayerTDs(playerid);
    TextDrawSetString(Text:TextBox[playerid],"~g~Clothes");
    TextDrawSetString(Text:TextTitle[playerid],"Choose The Option You Want:~n~~n~~n~~n~~n~~n~~n~Press ~g~F6~w~(T)~w~ To Choose A Number~n~Press ~r~LMB~w~ To Close This Box~n~");
    TextDrawSetString(Text:Text[playerid],"~b~1.~w~ Edit Clothes Positions.~n~~b~2.~W~ Put On Clothes.~n~~b~3.~w~ Take Off Clothes.~n~~b~4.~w~ Throw Away Clothes.");
    IsInClothesMenu[playerid] = 1;
    IsChoosingEditedCloth[playerid] = 0;
    return 1;
}
This Is The Command. So After That OnPlayerText should be the player's choice to choose..

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!strcmp(text, "1", true))
    {
        if(IsChoosingEditedCloth[playerid] == 1)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, 0))
            {
                EditAttachedObject(playerid,0);
                IsChoosingEditedCloth[playerid] = 0;
            }
            return 0;
        }
        if(IsInClothesMenu[playerid] == 1)
        {
            new string[300];
            for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
            {
                    format(string, sizeof(string), "%s~n~", AttachmentObjects[ao[playerid][i][ao_model]][attachname]);
                    TextDrawSetString(Text:TextBox[playerid],"~g~Edit Clothes");
                    TextDrawSetString(Text:TextTitle[playerid],"Choose The Cloth You Want To Edit~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Press ~g~F6~w~(T) To Choose A Number~n~Press ~r~LMB~w~ To Close This Box~n~");
                    TextDrawSetString(Text:Text[playerid],string);
            }
            IsChoosingEditedCloth[playerid] = 1;
            return 0;
        }
}
        return 1;
    }
    return 1;
}
So.. but when i send text "1".. it doesn't nothing.. it doesn't list the player's attached objects..
so i thought it was something with IsInClothesMenu[playerid].. so i made a command to check if it is on 1...
the response was that it is on 1... now i got a problem there is no response at all...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)