SetPlayerAttachedObject Problem
#1

So I Got No Errors And So.. i want to make a clothing system that actually saves...
so that is what i had

that is everything i had related to clothes

pawn Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
    if(response)
    {
        SendClientMessage(playerid, COLOR_GREEN, "Attached Object Edition Saved.");

        ao[playerid][index][ao_x] = fOffsetX;
        ao[playerid][index][ao_y] = fOffsetY;
        ao[playerid][index][ao_z] = fOffsetZ;
        ao[playerid][index][ao_rx] = fRotX;
        ao[playerid][index][ao_ry] = fRotY;
        ao[playerid][index][ao_rz] = fRotZ;
        ao[playerid][index][ao_sx] = fScaleX;
        ao[playerid][index][ao_sy] = fScaleY;
        ao[playerid][index][ao_sz] = fScaleZ;
        SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Attached Object Edition Not Saved.");

        new i = index;
        SetPlayerAttachedObject(playerid, index, modelid, boneid, ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]);
    }
    return 1;
}

stock CountAttachedObjects(playerid)
{
    new count;
    for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, i)) count++;
    }
    return count;
}

stock GetFreeClothSlot()
{
    new file[40];
    for(new v = 0; v < MAX_CLOTHES; v++)
    {
        format(file, sizeof(file), "Clothes/%d.ini", v);
        if(!fexist(file))
        {
            return v;
        }
    }
    return -1;
}

stock CreatePlayerAttachedCloth(playerid,index,modelid,bone)
{
    new c = GetFreeClothSlot();
    SetPlayerAttachedObject(playerid, index ,modelid, bone);
    EditAttachedObject(playerid,index);
    new file[256];
    format(file,256,"Clothes/%d.ini",c);
    dini_Create(file);
    dini_Set(file,"Owner",PlayerName(playerid));
    dini_IntSet(file,"Model",modelid);
    dini_IntSet(file,"Bone",bone);
    dini_FloatSet(file,"cX",0.0);
    dini_FloatSet(file,"cY",0.0);
    dini_FloatSet(file,"cZ",0.0);
    dini_FloatSet(file,"rX",0.0);
    dini_FloatSet(file,"rY",0.0);
    dini_FloatSet(file,"rZ",0.0);
    dini_FloatSet(file,"sX",0.0);
    dini_FloatSet(file,"sY",0.0);
    dini_FloatSet(file,"sZ",0.0);
    ao[playerid][index][ao_model] = dini_Int(file,"Model");
    ao[playerid][index][ao_bone] = dini_Int(file,"Bone");
    ao[playerid][index][ao_x] = dini_Float(file,"cX");
    ao[playerid][index][ao_y] = dini_Float(file,"cY");
    ao[playerid][index][ao_z] = dini_Float(file,"cZ");
    ao[playerid][index][ao_rx] = dini_Float(file,"rX");
    ao[playerid][index][ao_ry] = dini_Float(file,"rY");
    ao[playerid][index][ao_rz] = dini_Float(file,"rZ");
    ao[playerid][index][ao_sx] = dini_Float(file,"sX");
    ao[playerid][index][ao_sy] = dini_Float(file,"sY");
    ao[playerid][index][ao_sz] = dini_Float(file,"sZ");
}

stock LoadPlayerClothes(playerid)
{
    new file[256];
    for(new v = 0; v < MAX_CLOTHES; v++)
    {
        format(file, sizeof(file), "Clothes/%d.ini", v);
        if(fexist(file))
        {
            if(!strcmp(PlayerName(playerid), dini_Get(file,"Owner"), false))
            {
                new index = CountAttachedObjects(playerid);
                ao[playerid][index][ao_model] = dini_Int(file,"Model");
                ao[playerid][index][ao_bone] = dini_Int(file,"Bone");
                ao[playerid][index][ao_x] = dini_Float(file,"cX");
                ao[playerid][index][ao_y] = dini_Float(file,"cY");
                ao[playerid][index][ao_z] = dini_Float(file,"cZ");
                ao[playerid][index][ao_rx] = dini_Float(file,"rX");
                ao[playerid][index][ao_ry] = dini_Float(file,"rY");
                ao[playerid][index][ao_rz] = dini_Float(file,"rZ");
                ao[playerid][index][ao_sx] = dini_Float(file,"sX");
                ao[playerid][index][ao_sy] = dini_Float(file,"sY");
                ao[playerid][index][ao_sz] = dini_Float(file,"sZ");
            }
        }
    }
    return 1;
}

CMD:createcloth(playerid,params[])
{
    new modelid;
    new bone;
    if(sscanf(params,"dd",modelid,bone)) return SendClientMessage(playerid,COLOR_RED,"Usage: /createcloth modelid bone");
    if(PlayerInfo[playerid][pAdmin] == 0) return 0;
    if(CountAttachedObjects(playerid) == 10) return SendClientMessage(playerid,COLOR_RED,"Error: {FFFFFF}You Cannot Create Anymore Clothes");
    CreatePlayerAttachedCloth(playerid,CountAttachedObjects(playerid),modelid,bone);
    return 1;
}
My problem is that the clothes don't load when i quit and rejoin..

My OnPlayerSpawn Callback cloth thing

pawn Код:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        new index = i;
        if(IsPlayerAttachedObjectSlotUsed(playerid, i))
        {
            RemovePlayerAttachedObject(playerid, i);
            SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
            return 1;
        }
        else
        {
            SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
        }
    }

PS. I am new to the forums.. so i wasn't sure how to put the script lines into the thread.
Reply
#2

Код:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        new index = i;
		if(IsPlayerAttachedObjectSlotUsed(playerid, i))
	    {
	        RemovePlayerAttachedObject(playerid, i);
	        SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
	        return 1;
	    }
    	else
    	{
    	    SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
    	}
    }
Reply
#3

Wrap your code with bbcode
Quote:

[pawn]Code[/.pawn]

tags, please.

First of all, let's reduce area of search - is file created, and values in it are saved properly?

BTW, I recommend using y_ini from YSI

Edit:

You can simplyfy the code in onspawn callback - the return there might screw things up

pawn Код:
for(new i = 0; i != MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
    SetPlayerAttachedObject(playerid, i, ao[playerid][i][ao_model], ao[playerid][i][ao_bone], ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]);
}
Reply
#4

pawn Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
    if(response)
    {
        SendClientMessage(playerid, COLOR_GREEN, "Attached Object Edition Saved.");

        ao[playerid][index][ao_x] = fOffsetX;
        ao[playerid][index][ao_y] = fOffsetY;
        ao[playerid][index][ao_z] = fOffsetZ;
        ao[playerid][index][ao_rx] = fRotX;
        ao[playerid][index][ao_ry] = fRotY;
        ao[playerid][index][ao_rz] = fRotZ;
        ao[playerid][index][ao_sx] = fScaleX;
        ao[playerid][index][ao_sy] = fScaleY;
        ao[playerid][index][ao_sz] = fScaleZ;
        SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Attached Object Edition Not Saved.");

        new i = index;
        SetPlayerAttachedObject(playerid, index, modelid, boneid, ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]);
    }
    return 1;
}

stock CountAttachedObjects(playerid)
{
    new count;
    for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, i)) count++;
    }
    return count;
}

stock GetFreeClothSlot()
{
    new file[40];
    for(new v = 0; v < MAX_CLOTHES; v++)
    {
        format(file, sizeof(file), "Clothes/%d.ini", v);
        if(!fexist(file))
        {
            return v;
        }
    }
    return -1;
}

stock CreatePlayerAttachedCloth(playerid,index,modelid,bone)
{
    new c = GetFreeClothSlot();
    SetPlayerAttachedObject(playerid, index ,modelid, bone);
    EditAttachedObject(playerid,index);
    new file[256];
    format(file,256,"Clothes/%d.ini",c);
    dini_Create(file);
    dini_Set(file,"Owner",PlayerName(playerid));
    dini_IntSet(file,"Model",modelid);
    dini_IntSet(file,"Bone",bone);
    dini_FloatSet(file,"cX",0.0);
    dini_FloatSet(file,"cY",0.0);
    dini_FloatSet(file,"cZ",0.0);
    dini_FloatSet(file,"rX",0.0);
    dini_FloatSet(file,"rY",0.0);
    dini_FloatSet(file,"rZ",0.0);
    dini_FloatSet(file,"sX",0.0);
    dini_FloatSet(file,"sY",0.0);
    dini_FloatSet(file,"sZ",0.0);
    ao[playerid][index][ao_model] = dini_Int(file,"Model");
    ao[playerid][index][ao_bone] = dini_Int(file,"Bone");
    ao[playerid][index][ao_x] = dini_Float(file,"cX");
    ao[playerid][index][ao_y] = dini_Float(file,"cY");
    ao[playerid][index][ao_z] = dini_Float(file,"cZ");
    ao[playerid][index][ao_rx] = dini_Float(file,"rX");
    ao[playerid][index][ao_ry] = dini_Float(file,"rY");
    ao[playerid][index][ao_rz] = dini_Float(file,"rZ");
    ao[playerid][index][ao_sx] = dini_Float(file,"sX");
    ao[playerid][index][ao_sy] = dini_Float(file,"sY");
    ao[playerid][index][ao_sz] = dini_Float(file,"sZ");
}

stock LoadPlayerClothes(playerid)
{
    new file[256];
    for(new v = 0; v < MAX_CLOTHES; v++)
    {
        format(file, sizeof(file), "Clothes/%d.ini", v);
        if(fexist(file))
        {
            if(!strcmp(PlayerName(playerid), dini_Get(file,"Owner"), false))
            {
                new index = CountAttachedObjects(playerid);
                ao[playerid][index][ao_model] = dini_Int(file,"Model");
                ao[playerid][index][ao_bone] = dini_Int(file,"Bone");
                ao[playerid][index][ao_x] = dini_Float(file,"cX");
                ao[playerid][index][ao_y] = dini_Float(file,"cY");
                ao[playerid][index][ao_z] = dini_Float(file,"cZ");
                ao[playerid][index][ao_rx] = dini_Float(file,"rX");
                ao[playerid][index][ao_ry] = dini_Float(file,"rY");
                ao[playerid][index][ao_rz] = dini_Float(file,"rZ");
                ao[playerid][index][ao_sx] = dini_Float(file,"sX");
                ao[playerid][index][ao_sy] = dini_Float(file,"sY");
                ao[playerid][index][ao_sz] = dini_Float(file,"sZ");
            }
        }
    }
    return 1;
}

CMD:createcloth(playerid,params[])
{
    new modelid;
    new bone;
    if(sscanf(params,"dd",modelid,bone)) return SendClientMessage(playerid,COLOR_RED,"Usage: /createcloth modelid bone");
    if(PlayerInfo[playerid][pAdmin] == 0) return 0;
    if(CountAttachedObjects(playerid) == 10) return SendClientMessage(playerid,COLOR_RED,"Error: {FFFFFF}You Cannot Create Anymore Clothes");
    CreatePlayerAttachedCloth(playerid,CountAttachedObjects(playerid),modelid,bone);
    return 1;
}
my OnPlayerSpawn callback clothes part.
pawn Код:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        new index = i;
        if(IsPlayerAttachedObjectSlotUsed(playerid, i))
        {
            RemovePlayerAttachedObject(playerid, i);
            SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
            return 1;
        }
        else
        {
            SetPlayerAttachedObject(playerid, index, ao[playerid][index][ao_model], ao[playerid][index][ao_bone], ao[playerid][index][ao_x], ao[playerid][index][ao_y], ao[playerid][index][ao_z], ao[playerid][index][ao_rx], ao[playerid][index][ao_ry], ao[playerid][index][ao_rz], ao[playerid][index][ao_sx], ao[playerid][index][ao_sy], ao[playerid][index][ao_sz]);
        }
    }
my whole gamemode uses dini.. It's really hard to change it back.. and the files and values are created correctly... nothing wrong with them
Reply
#5

i did this command to check if the clothes actually load correctly..
pawn Код:
CMD:cloth(playerid,params[])
{
    for(new i = 0; i != MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        new string[300];
        format(string,300,"%d",ao[playerid][i][ao_model]);
        SendClientMessage(playerid,COLOR_WHITE,string);
    }
    return 1;
}
and this was the response.. so that means that an object actually loaded correctly.. but it never showed
Reply
#6

Could you put this command code in OnPlayerSpawn? And could you show your full current OnPlayerSpawn?
Reply
#7

pawn Код:
public OnPlayerSpawn(playerid)
{
    IsSpawned[playerid] = 1;
    if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
   
    TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date), TextDrawShowForPlayer(playerid,Day);
   
    TextDrawShowForPlayer(playerid,Text:LasVenturas[playerid]);
    TextDrawShowForPlayer(playerid,Text:CopsAndRobbers[playerid]);
   
    for(new i = 0; i != MAX_PLAYER_ATTACHED_OBJECTS; i++)
    {
        SetPlayerAttachedObject(playerid, i, ao[playerid][i][ao_model], ao[playerid][i][ao_bone], ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]);
    }

    TextDrawShowForPlayer(playerid,Text:PlayerHelp[playerid]);
    TextDrawShowForPlayer(playerid, Text:PlayerHelpTitle[playerid]);
    HelpTextTime[playerid] = 7;
    TextDrawSetString(Text:PlayerHelpTitle[playerid], "~g~Help");
    TextDrawSetString(Text:PlayerHelp[playerid],"~n~~n~~n~Remember To Use ~y~/colors.~n~~w~Read the Rules Using ~y~/rules.~n~~w~You Can Always Read~y~ /help~w~ For Help.~n~And You Can Also Read ~y~/cmds~w~ To Know The Server's Commands.~n~~n~Press ~r~LMB~w~ To Close These Boxes~n~");
   
    new string[300];
    ShowPlayerTDs(playerid);
    TextDrawSetString(Text:TextBox[playerid],"~g~Inventory");
    TextDrawSetString(Text:TextTitle[playerid],"~w~Your Inventory Has:~n~~n~~n~~n~~n~~n~~n~~n~~n~Press ~b~LMB~w~ To Close This Box~n~");
    format(string,300,"~b~Money: ~g~$%d~n~~b~Bank Money: ~g~$%d~n~~b~Condoms: ~w~%d~n~~b~Fake Wallets: ~w~%d~n~~b~Vehicles: ~w~%d~n~~b~Houses: ~w~%d",GetPlayerMoney(playerid),BankInfo[playerid][Balance],PlayerInfo[playerid][pCondom],PlayerInfo[playerid][pFakeWallet],GetPlayerVehicles{playerid},GetPlayerHouses(playerid));
    TextDrawSetString(Text:Text[playerid],string);
   
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SetCameraBehindPlayer(playerid);
   
    SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pWantedLevel]);
    SetPlayerToTeamColor(playerid);
    WantedLevelColor(playerid);
   
    TextDrawHideForPlayer(playerid,Text:SPEEDO[playerid]);
    TextDrawShowForPlayer(playerid,Text:Location[playerid]);
   
    if(gTeam[playerid] == Team_Civi || gTeam[playerid] == Team_Rape || gTeam[playerid] == Team_Steal || gTeam[playerid] == Team_Kidnap || gTeam[playerid] == Team_Terror)
    {
        new Random = random(sizeof(RandomSpawns));
        SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
        SetCameraBehindPlayer(playerid);
    }
    if(IsCop(playerid))
    {
        new Random = random(sizeof(CopSpawns));
        SetPlayerPos(playerid, CopSpawns[Random][0], CopSpawns[Random][1], CopSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, CopSpawns[Random][3]);
        SetCameraBehindPlayer(playerid);
    }
   
    for(new h = 0; h < MAX_HOUSES; h++)
    {
        new file[256];
        format(file, sizeof(file), "Houses/%d.ini", h);
        if(fexist(file))
        {
            if(!strcmp(PlayerName(playerid), HouseInfo[h][Owner], false))
            {
                if(HouseInfo[h][SpawnInHouse] == 1)
                {
                    if(HouseInfo[h][Level] == 1)
                    {
                        format(file,256,"Houses/%d.ini",h);
                        IsInHouse[playerid] = h;
                        SetPlayerPos(playerid,  246.6062,305.2832,999.1484);
                        SetPlayerFacingAngle(playerid, 270.4554);
                        SetPlayerInterior(playerid,1);
                        SetPlayerVirtualWorld(playerid,h);
                        HouseXExit[playerid] = dini_Float(file,"SX");
                        HouseYExit[playerid] = dini_Float(file,"SY");
                        HouseZExit[playerid] = dini_Float(file,"SZ");
                        HouseAExit[playerid] = dini_Float(file,"SA");
                    }
                    if(HouseInfo[h][Level] == 4)
                    {
                        format(file,256,"Houses/%d.ini",h);
                        IsInHouse[playerid] = h;
                        SetPlayerPos(playerid,  2324.3489,-1146.4670,1050.7101);
                        SetPlayerFacingAngle(playerid,358.5732);
                        SetPlayerInterior(playerid,12);
                        SetPlayerVirtualWorld(playerid,h);
                        HouseXExit[playerid] = dini_Float(file,"SX");
                        HouseYExit[playerid] = dini_Float(file,"SY");
                        HouseZExit[playerid] = dini_Float(file,"SZ");
                        HouseAExit[playerid] = dini_Float(file,"SA");
                    }
                    if(HouseInfo[h][Level] == 5)
                    {
                        format(file,256,"Houses/%d.ini",h);
                        IsInHouse[playerid] = h;
                        SetPlayerPos(playerid,  2233.6919, -1112.8107, 1050.8828);
                        SetPlayerFacingAngle(playerid, 8.6483);
                        SetPlayerInterior(playerid,5);
                        SetPlayerVirtualWorld(playerid,h);
                        HouseXExit[playerid] = dini_Float(file,"SX");
                        HouseYExit[playerid] = dini_Float(file,"SY");
                        HouseZExit[playerid] = dini_Float(file,"SZ");
                        HouseAExit[playerid] = dini_Float(file,"SA");
                    }
                    if(HouseInfo[h][Level] == 7)
                    {
                        format(file,256,"Houses/%d.ini",h);
                        IsInHouse[playerid] = h;
                        SetPlayerPos(playerid,  2319.1077,-1022.4829,1050.2109);
                        SetPlayerFacingAngle(playerid, 356.1610);
                        SetPlayerInterior(playerid,9);
                        SetPlayerVirtualWorld(playerid,h);
                        HouseXExit[playerid] = dini_Float(file,"SX");
                        HouseYExit[playerid] = dini_Float(file,"SY");
                        HouseZExit[playerid] = dini_Float(file,"SZ");
                        HouseAExit[playerid] = dini_Float(file,"SA");
                    }
                }
            }
        }
    }
   
    if(gTeam[playerid] == Team_Civi)
    {
        if(PlayerInfo[playerid][pSkill] == 0)
        {
            ShowPlayerDialog(playerid,DIALOG_SKILL,DIALOG_STYLE_LIST,"Skill","Rapist\nCon Artist\nHitman\nMechanic\nKidnapper","Select","Cancel");
        }
        else if(PlayerInfo[playerid][pSkill] == 1)
        {
            gTeam[playerid] = Team_Rape;
        }
        else if(PlayerInfo[playerid][pSkill] == 2)
        {
            gTeam[playerid] = Team_Steal;
        }
        else if(PlayerInfo[playerid][pSkill] == 3)
        {
            gTeam[playerid] = Team_Kidnap;
        }
        else if(PlayerInfo[playerid][pSkill] == 4)
        {
            gTeam[playerid] = Team_Hitman;
        }
        else if(PlayerInfo[playerid][pSkill] == 5)
        {
            gTeam[playerid] = Team_Mechanic;
        }
    }

    if(PlayerInfo[playerid][pJailTime] > 0)
    {
        IsInJail[playerid] = 1;
        IsInHouse[playerid] = -1;
        SetPlayerPos(playerid,197.8630,176.3163,1003.0234);
        SetPlayerFacingAngle(playerid,357.8896);
        SetPlayerInterior(playerid,3);
        SetPlayerVirtualWorld(playerid,1);
        TogglePlayerControllable(playerid, true);
        SetPlayerHealth(playerid,100);
        SetPlayerWantedLevel(playerid,0);
        TextDrawShowForPlayer(playerid,Text:JailTB[playerid]);
        format(string,300,"~w~Time Until Bail: %s~n~Bail: ~g~$%d",TimeConvert(PlayerInfo[playerid][pJailTime]),PlayerInfo[playerid][pJailBail]);
        TextDrawSetString(Text:JailTB[playerid],string);
        GameTextForPlayer(playerid,"~w~Continuing ~r~Jail Time.",5000,5);
    }
    return 1;
}
that my hall OnPlayerSpawn callback :/
Reply
#8

whole*
and i putted this command in OnPlayerSpawn.. it gave the same response as in the screenshot.. what i realized now that in my clothes file there are 2 created clothes.. in the response it only tells the second one... the first one is ignored.. but how? and now when i use the command /createcloth it tells me u can't create anymore clothes which means i reached the 9th attached object.. while only 1 is loaded.. THIS IS CRAZY O.o
Reply
#9

Anyone please i need to finish that..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)