what's wrong -.-
#1

pawn Код:
public AddBuilding(Float:x, Float:y, Float:z, interior, Float:x2, Float:y2, Float:z2, interior2, name[])
{
    new file[128];
    for(new i=0;i<MAX_BS;i++)
    {
        format(file, sizeof(file), "Budynki/%d.ini", i);
        if(!fexist(file))
        {
            dini_Create(file);
            dini_FloatSet(file, "ExX", x);
            dini_FloatSet(file, "ExY", y);
            dini_FloatSet(file, "ExZ", z);
            dini_IntSet(file, "ExInt", interior);
            dini_FloatSet(file, "InX", x2);
            dini_FloatSet(file, "InY", y2);
            dini_FloatSet(file, "InZ", z2);
            dini_IntSet(file, "InInt", interior2);
            dini_Set(file, "Name", name);
            dini_IntSet(file, "Faction", 0);
            LoadBuilding(i);
            break;
        }
    }
    return 1;
}
public LoadBuilding(id)
{
    new file[128], name[128];
    format(file, sizeof(file), "Budynki/%d.ini", id);
    BuildingInfo[id][bExteriorX] = dini_Float(file, "ExX");
    BuildingInfo[id][bExteriorY] = dini_Float(file, "ExY");
    BuildingInfo[id][bExteriorZ] = dini_Float(file, "ExZ");
    BuildingInfo[id][bExteriorIntID] = dini_Int(file, "ExInt");
    BuildingInfo[id][bInteriorX] = dini_Float(file, "InX");
    BuildingInfo[id][bInteriorY] = dini_Float(file, "InY");
    BuildingInfo[id][bInteriorZ] = dini_Float(file, "InZ");
    BuildingInfo[id][bInteriorIntID] = dini_Int(file, "InInt");
    format(name, sizeof(name), "%s", dini_Get(file, "Name"));
    BuildingInfo[id][bName] = name;
    BuildingInfo[id][bFaction] = dini_Int(file, "Faction");
    return 1;
}
COMMAND:enter(playerid, params[])
{
    for(new i=0;i<MAX_BS;i++)
    {
        if(PlayerToPoint(3.0, playerid, BuildingInfo[i][bExteriorX], BuildingInfo[i][bExteriorY], BuildingInfo[i][bExteriorZ]))
        {
            SetPlayerPos(playerid, BuildingInfo[i][bInteriorX], BuildingInfo[i][bInteriorY], BuildingInfo[i][bInteriorZ]);
        }
    }
    return 1;
}
Okey, so this code creates a building, then loads it. When i type /enter in the place where it was created nothing happens What's wrong?
Reply


Messages In This Thread
what's wrong -.- - by sekol - 22.03.2011, 19:46
Re: what's wrong -.- - by Sascha - 22.03.2011, 19:47
Re: what's wrong -.- - by sekol - 22.03.2011, 19:50
Re: what's wrong -.- - by Jefff - 22.03.2011, 19:58
Re: what's wrong -.- - by sekol - 22.03.2011, 20:07
Re: what's wrong -.- - by dice7 - 22.03.2011, 20:12
Re: what's wrong -.- - by Steven82 - 22.03.2011, 22:46
Re: what's wrong -.- - by sekol - 23.03.2011, 07:24
Re: what's wrong -.- - by sekol - 24.03.2011, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)