Alguien sabe porque no carga mi sistema de casas?
#1

Hola,


Buenas tardes, alguien me pdria decir porque no carga el sistema este?
pawn Код:
//INCLUDES

#include <a_samp>
#include <Dini>
#include <streamer>

//define system

#define MAX_HOUSES 200
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COL_ORANGE 0xFF8000FF

//ENUM

enum hInfo
{
    Float:hEnterX,
    Float:hEnterY,
    Float:hEnterZ,
    Float:hExitX,
    Float:hExitY,
    Float:hExitZ,
    hInsideInt,
    hInsideVir,
    hOutsideInt,
    hOutsideVir,
    bool:hOwned,
    hOwner[MAX_PLAYER_NAME],
    hPrice,
    hPickup,
    hIcon,
    hVecModel,
    Float:hVecX,
    Float:hVecY,
    Float:hVecZ,
    Float:hVecA
};

//New

new HouseInfo[MAX_HOUSES][hInfo];
new HouseCar[MAX_HOUSES];
new fstring[100];

//Public

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 16 && !IsPlayerInAnyVehicle(playerid))
    {
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hInsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hInsideVir]);

            }
            else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hInsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hOutsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hOutsideVir]);
            }
        }
    }
    return 1;
}
main()
{
}
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("HOUSES SYSTEM WORKING AS WELL!");
    print("--------------------------------------\n");
    {
        SetTimer("UpdatePlayersHouseInfo", 1000, true);
    }
    new a;
    for(new i; i < MAX_HOUSES; i++)
    {
        #define houseid i
        new fstring[100];
        format(fstring, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
            #undef houseid
            a++;
        }
    }
    printf(" Se han cargado %d casas",a);
    return 1;
}

forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
    new str[100];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        for(new j = 0; j < MAX_HOUSES; j++)
        {
            if(IsPlayerInRangeOfPoint(j,2.0, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir])
            {
                if(HouseInfo[j][hOwned])
                    format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]);
                else
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]);
                GameTextForPlayer(i, str, 2000, 3);
            }
         }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/buyhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "ERROR: This house is already owned");
                if(GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, COLOR_RED, "ERROR: You don't have enough money for this");

                HouseInfo[i][hOwned] = true;
                strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName));
                GivePlayerMoney(playerid, -HouseInfo[i][hPrice]);
                SendClientMessage(playerid, COL_ORANGE, "SERVER: You have bought this house");
                SaveHouse(i);
                LoadHouseVisual(i, true);
                return 1;
            }
        }
    }
    if(!strcmp(cmdtext, "/sellhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(!strcmp(HouseInfo[i][hOwner], pName, false))
                {
                    strmid(HouseInfo[i][hOwner], "For Sale", 0, false, 8);
                    HouseInfo[i][hOwned] = false;
                    GivePlayerMoney(playerid, HouseInfo[i][hPrice]/2);
                    SendClientMessage(playerid, COL_ORANGE, "SERVER: You have sold your house");
                    SaveHouse(i);
                    LoadHouseVisual(i, true);
                    return 1;
                }
             }
        }
    }
    if(!strcmp(cmdtext, "/housecar", true))
    {
        new pName[MAX_PLAYER_NAME], Float:X, Float:Y, Float:Z;
        new houseid = cmdtext[10];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        if(!strcmp(HouseInfo[houseid][hOwner], pName, false)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not owned of this house");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in an vehicle");
        GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
        new Float:A;
        GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
        HouseInfo[houseid][hVecX] = X;
        HouseInfo[houseid][hVecY] = Y;
        HouseInfo[houseid][hVecZ] = Z;
        HouseInfo[houseid][hVecA] = A;
        return 1;
    }
    return 0;
}

//==============================================================================

stock LoadHouse(houseid)
{
    new fstring[100];
    format(fstring, 10, "Houses/%d", houseid);
    if(!dini_Exists(fstring)) return 0;
    {
        HouseInfo[houseid][hEnterX] = dini_Float(fstring, "EnterX");
        HouseInfo[houseid][hEnterY] = dini_Float(fstring, "EnterY");
        HouseInfo[houseid][hEnterZ] = dini_Float(fstring, "EnterZ");
        HouseInfo[houseid][hExitX] = dini_Float(fstring, "ExitX");
        HouseInfo[houseid][hExitY] = dini_Float(fstring, "ExitY");
        HouseInfo[houseid][hExitZ] = dini_Float(fstring, "ExitZ");
        HouseInfo[houseid][hInsideInt] = dini_Int(fstring, "InsideInt");
        HouseInfo[houseid][hInsideVir] = dini_Int(fstring, "InsideVir");
        HouseInfo[houseid][hOutsideInt] = dini_Int(fstring, "OutsideInt");
        HouseInfo[houseid][hOUtsideVir] = dini_Int(fstring, "OutsideVir");
        HouseInfo[houseid][hOwned] = dini_Bool(fstring, "Owned") ? true : false;
        strmid(HouseInfo[houseid][hOwner], dini_Get(fstring, "Owner"), 0, false, strlen(dini_Get("Owner")));
        HouseInfo[houseid][hPrice] = dini_Int(fstring, "Price");
        HouseInfo[houseid][hVecModel] = dini_Int(fstring, "HV_Model");
        HouseInfo[houseid][hVecX] = dini_Float(fstring, "HV_PosX");
        HouseInfo[houseid][hVecY] = dini_Float(fstring, "HV_PosZ");
        HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
        HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
    }
    return 1;
}

stock LoadHouseVisual(houseid, bool:reload = false)
{
    if(reload)
    {
        DestroyDynamicMapIcon(HouseInfo[houseid][hIcon]);
        DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
        DestroyVehicle(HouseCar[houseid]);
    }
    if(!HouseInfo[houseid][hOwned])
    {
       
        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    else
    {
       
        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    if(IsValidVehicleModel(HouseInfo[houseid][hVecModel]))
    {
        HouseCar[houseid] = CreateVehicle(HouseInfo[houseid][hVecModel], HouseInfo[houseid][hVecX], HouseInfo[houseid][hVecY], HouseInfo[houseid][hVecZ], HouseInfo[houseid][hVecA], -1, -1, -1);
    }
}

stock IsValidVehicleModel(vehiclemodel)
{
    if(vehiclemodel >= 400 && vehiclemodel <= 611)
    {
        return true;
    }
    return false;
}

stock SaveHouse(houseid)
{
    dini_FloatSet(fstring, "EnterX", HouseInfo[houseid][hEnterX]);
    dini_FloatSet(fstring, "EnterY", HouseInfo[houseid][hEnterY]);
    dini_FloatSet(fstring, "EnterZ", HouseInfo[houseid][hEnterZ]);
    dini_FloatSet(fstring, "ExitX", HouseInfo[houseid][hExitX]);
    dini_FloatSet(fstring, "ExitY", HouseInfo[houseid][hExitY]);
    dini_FloatSet(fstring, "ExitZ", HouseInfo[houseid][hExitZ]);
    dini_IntSet(fstring, "InsideInt", HouseInfo[houseid][hInsideInt]);
    dini_IntSet(fstring, "InsideVir", HouseInfo[houseid][hInsideVir]);
    dini_IntSet(fstring, "OutsideInt", HouseInfo[houseid][hOutsideInt]);
    dini_IntSet(fstring, "OutsideVir", HouseInfo[houseid][hOutsideVir]);
    dini_BoolSet(fstring, "Owned", HouseInfo[houseid][hOwned]);
    //HouseInfo[houseid][hOwner] = dini_Get(fstring, "Owner");
    dini_IntSet(fstring, "Price", HouseInfo[houseid][hPrice]);
    dini_IntSet(fstring, "HV_Model", HouseInfo[houseid][hVecModel]);
    dini_FloatSet(fstring, "HV_PosX", HouseInfo[houseid][hVecX]);
    dini_FloatSet(fstring, "HV_PosZ", HouseInfo[houseid][hVecY]);
    HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
    HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
}

//==============================================================================
Y en el log me aparece que se cargo, pero no me salta el "print" entonses no carga, ademas que no ejecuta los cmds que estan en el gamemode:

pawn Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team

[17:53:22]
[17:53:22] Server Plugins
[17:53:22] --------------
[17:53:22]  Loading plugin: sscanf
[17:53:22]

[17:53:22]  ===============================

[17:53:22]       sscanf plugin loaded.    

[17:53:22]          Version:  2.8.1        

[17:53:22]    (c) 2012 Alex "******" Cole  

[17:53:22]  ===============================

[17:53:22]   Loaded.
[17:53:22]  Loading plugin: mysql
[17:53:22]

  > MySQL plugin R7 successfully loaded.

[17:53:22]   Loaded.
[17:53:22]  Loading plugin: streamer
[17:53:22]

*** Streamer Plugin v2.5.2 by Incognito loaded ***

[17:53:22]   Loaded.
[17:53:22]  Loaded 3 plugins.

[17:53:22]
[17:53:22] Ban list
[17:53:22] --------
[17:53:22]  Loaded: samp.ban
[17:53:22]
[17:53:22]
[17:53:22] Filterscripts
[17:53:22] ---------------
[17:53:22]   Loading filterscript 'sql&cmd.amx'...
[17:53:22] [MYSQL]: Connection to `sa-mp` succesful!
[17:53:22] Connecting to SQL
[17:53:22]   Loading filterscript 'date.amx'...
[17:53:22]
--------------------------------------
[17:53:22] DATE SYSTEM
[17:53:22] --------------------------------------

[17:53:22]   Loading filterscript 'ZonesAndWar.amx'...
[17:53:22]
--------------------------------------
[17:53:22]  GANG ZONES CREATED!
[17:53:22] --------------------------------------

[17:53:22]   Loading filterscript 'AdminHouses.amx'...
[17:53:22]
--------------------------------------
[17:53:22]  ADMIN HOUSES LOADED SUCCESFULLY!
[17:53:22] --------------------------------------

[17:53:22]   Loading filterscript 'HOUSES.amx'... //SUPUESTAMENTE CARGADO, PERO EL "PRINT" NO SALE POR ESO NO ME CARGA! AYUDA POR FAVOR
[17:53:22]   Loaded 5 filterscripts.

[17:53:22] [MYSQL]: Connection to `sa-mp` succesful!
[17:53:22] Number of vehicle models: 27
Si alguien me pdria ayudar por favor estaria bueno!

Saludos,
Pablo
Reply
#2

pawn Код:
for(new houseid=0; houseid < MAX_HOUSES; houseid++)
    {
        new fstring[100];
        format(fstring, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
        }
        if(houseid == MAX_HOUSES-1) printf(" Se han cargado %d casas",i);
    }
Reply
#3

Estoy desde otra pc y me acabo de descargar el sa-mp, agrego mi sistema denuevo y sigue sin aparecer el print que me seсala que se cargo correctamente el filterscript, en el log me tendria que aparecer esto
pawn Код:
print("\n--------------------------------------");
    print("HOUSES SYSTEM WORKING AS WELL!");
    print("--------------------------------------\n");
y la verdad, me sigue sin aparecer. Te mando el log y miralo:

pawn Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x-R2, (C)2005-2013 SA-MP Team

[21:38:03]
[21:38:03] Server Plugins
[21:38:03] --------------
[21:38:03]  Loaded 0 plugins.

[21:38:03]
[21:38:03] Filterscripts
[21:38:03] ---------------
[21:38:03]   Loading filterscript 'HOUSES.amx'...
[21:38:03]   Loaded 1 filterscripts.

[21:38:03] Loaded 3 vehicles from: vehicles/trains.txt
[21:38:03] Loaded 3 vehicles from: vehicles/pilots.txt
[21:38:03] Loaded 15 vehicles from: vehicles/lv_law.txt
[21:38:03] Loaded 39 vehicles from: vehicles/lv_airport.txt
[21:38:03] Loaded 255 vehicles from: vehicles/lv_gen.txt
[21:38:03] Loaded 38 vehicles from: vehicles/sf_law.txt
[21:38:03] Loaded 35 vehicles from: vehicles/sf_airport.txt
[21:38:03] Loaded 353 vehicles from: vehicles/sf_gen.txt
[21:38:03] Loaded 24 vehicles from: vehicles/ls_law.txt
[21:38:03] Loaded 37 vehicles from: vehicles/ls_airport.txt
[21:38:03] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[21:38:03] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[21:38:03] Loaded 71 vehicles from: vehicles/whetstone.txt
[21:38:03] Loaded 168 vehicles from: vehicles/bone.txt
[21:38:03] Loaded 61 vehicles from: vehicles/flint.txt
[21:38:03] Loaded 96 vehicles from: vehicles/tierra.txt
[21:38:03] Loaded 96 vehicles from: vehicles/red_county.txt
[21:38:03] Total vehicles from files: 1781
[21:38:03]
---------------------------------------
[21:38:03] Running Grand Larceny - by the SA-MP team

[21:38:03] ---------------------------------------

[21:38:03] Number of vehicle models: 173
Y habia agregado esto nuevo, mirenlo: (lo que dijiste arriba)

pawn Код:
//INCLUDES

#include <a_samp>
#include <Dini>
#include <streamer>

//define system

#define MAX_HOUSES 200
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COL_ORANGE 0xFF8000FF

//ENUM

enum hInfo
{
    Float:hEnterX,
    Float:hEnterY,
    Float:hEnterZ,
    Float:hExitX,
    Float:hExitY,
    Float:hExitZ,
    hInsideInt,
    hInsideVir,
    hOutsideInt,
    hOutsideVir,
    bool:hOwned,
    hOwner[MAX_PLAYER_NAME],
    hPrice,
    hPickup,
    hIcon,
    hVecModel,
    Float:hVecX,
    Float:hVecY,
    Float:hVecZ,
    Float:hVecA
};

//New

new HouseInfo[MAX_HOUSES][hInfo];
new HouseCar[MAX_HOUSES];
new fstring[100];

//Public

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 16 && !IsPlayerInAnyVehicle(playerid))
    {
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hInsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hInsideVir]);

            }
            else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hInsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hOutsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hOutsideVir]);
            }
        }
    }
    return 1;
}
main()
{
}
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("HOUSES SYSTEM WORKING AS WELL!");
    print("--------------------------------------\n");
    {
        SetTimer("UpdatePlayersHouseInfo", 1000, true);
    }
    new a;
    for(new i; i < MAX_HOUSES; i++)
    {
        #define houseid i
        new fstring[100];
        format(fstring, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
            #undef houseid
            a++;
        }
    }
    printf(" Se han cargado %d casas",a);
    return 1;
}

forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
    new str[100];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        for(new j = 0; j < MAX_HOUSES; j++)
        {
            if(IsPlayerInRangeOfPoint(j,2.0, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir])
            {
                if(HouseInfo[j][hOwned])
                    format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]);
                else
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]);
                GameTextForPlayer(i, str, 2000, 3);
            }
         }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/buyhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "ERROR: This house is already owned");
                if(GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, COLOR_RED, "ERROR: You don't have enough money for this");

                HouseInfo[i][hOwned] = true;
                strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName));
                GivePlayerMoney(playerid, -HouseInfo[i][hPrice]);
                SendClientMessage(playerid, COL_ORANGE, "SERVER: You have bought this house");
                SaveHouse(i);
                LoadHouseVisual(i, true);
                return 1;
            }
        }
    }
    if(!strcmp(cmdtext, "/sellhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(!strcmp(HouseInfo[i][hOwner], pName, false))
                {
                    strmid(HouseInfo[i][hOwner], "For Sale", 0, false, 8);
                    HouseInfo[i][hOwned] = false;
                    GivePlayerMoney(playerid, HouseInfo[i][hPrice]/2);
                    SendClientMessage(playerid, COL_ORANGE, "SERVER: You have sold your house");
                    SaveHouse(i);
                    LoadHouseVisual(i, true);
                    return 1;
                }
             }
        }
    }
    if(!strcmp(cmdtext, "/housecar", true))
    {
        new pName[MAX_PLAYER_NAME], Float:X, Float:Y, Float:Z;
        new houseid = cmdtext[10];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        if(!strcmp(HouseInfo[houseid][hOwner], pName, false)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not owned of this house");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in an vehicle");
        GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
        new Float:A;
        GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
        HouseInfo[houseid][hVecX] = X;
        HouseInfo[houseid][hVecY] = Y;
        HouseInfo[houseid][hVecZ] = Z;
        HouseInfo[houseid][hVecA] = A;
        return 1;
    }
    return 0;
}

//==============================================================================

stock LoadHouse(houseid)
{
    for(new houseid=0; houseid < MAX_HOUSES; houseid++)
    {
        new fstring[100];
        format(fstring, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
        }
        if(houseid == MAX_HOUSES-1) printf(" Se han cargado %d casas",i);
    }
}

stock LoadHouseVisual(houseid, bool:reload = false)
{
    if(reload)
    {
        DestroyDynamicMapIcon(HouseInfo[houseid][hIcon]);
        DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
        DestroyVehicle(HouseCar[houseid]);
    }
    if(!HouseInfo[houseid][hOwned])
    {

        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    else
    {

        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    if(IsValidVehicleModel(HouseInfo[houseid][hVecModel]))
    {
        HouseCar[houseid] = CreateVehicle(HouseInfo[houseid][hVecModel], HouseInfo[houseid][hVecX], HouseInfo[houseid][hVecY], HouseInfo[houseid][hVecZ], HouseInfo[houseid][hVecA], -1, -1, -1);
    }
}

stock IsValidVehicleModel(vehiclemodel)
{
    if(vehiclemodel >= 400 && vehiclemodel <= 611)
    {
        return true;
    }
    return false;
}

stock SaveHouse(houseid)
{
    dini_FloatSet(fstring, "EnterX", HouseInfo[houseid][hEnterX]);
    dini_FloatSet(fstring, "EnterY", HouseInfo[houseid][hEnterY]);
    dini_FloatSet(fstring, "EnterZ", HouseInfo[houseid][hEnterZ]);
    dini_FloatSet(fstring, "ExitX", HouseInfo[houseid][hExitX]);
    dini_FloatSet(fstring, "ExitY", HouseInfo[houseid][hExitY]);
    dini_FloatSet(fstring, "ExitZ", HouseInfo[houseid][hExitZ]);
    dini_IntSet(fstring, "InsideInt", HouseInfo[houseid][hInsideInt]);
    dini_IntSet(fstring, "InsideVir", HouseInfo[houseid][hInsideVir]);
    dini_IntSet(fstring, "OutsideInt", HouseInfo[houseid][hOutsideInt]);
    dini_IntSet(fstring, "OutsideVir", HouseInfo[houseid][hOutsideVir]);
    dini_BoolSet(fstring, "Owned", HouseInfo[houseid][hOwned]);
    //HouseInfo[houseid][hOwner] = dini_Get(fstring, "Owner");
    dini_IntSet(fstring, "Price", HouseInfo[houseid][hPrice]);
    dini_IntSet(fstring, "HV_Model", HouseInfo[houseid][hVecModel]);
    dini_FloatSet(fstring, "HV_PosX", HouseInfo[houseid][hVecX]);
    dini_FloatSet(fstring, "HV_PosZ", HouseInfo[houseid][hVecY]);
    HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
    HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
}

//==============================================================================
Por favor nesesito ayuda
Reply
#4

a mi me aparece bien...

pawn Код:
//INCLUDES

#include <a_samp>
#include <Dini>
#include <streamer>

//define system

#define MAX_HOUSES 200
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COL_ORANGE 0xFF8000FF

//ENUM

enum hInfo
{
    Float:hEnterX,
    Float:hEnterY,
    Float:hEnterZ,
    Float:hExitX,
    Float:hExitY,
    Float:hExitZ,
    hInsideInt,
    hInsideVir,
    hOutsideInt,
    hOutsideVir,
    bool:hOwned,
    hOwner[MAX_PLAYER_NAME],
    hPrice,
    hPickup,
    hIcon,
    hVecModel,
    Float:hVecX,
    Float:hVecY,
    Float:hVecZ,
    Float:hVecA
};

//New

new HouseInfo[MAX_HOUSES][hInfo];
new HouseCar[MAX_HOUSES];
new fstring[100];

//Public

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & 16 && !IsPlayerInAnyVehicle(playerid))
    {
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hInsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hInsideVir]);

            }
            else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hInsideVir])
            {
                SetPlayerPos(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hOutsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hOutsideVir]);
            }
        }
    }
    return 1;
}
main()
{
}
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("HOUSES SYSTEM WORKING AS WELL!");
    print("--------------------------------------\n");
    SetTimer("UpdatePlayersHouseInfo", 1000, true);
    new a;
    for(new i; i < MAX_HOUSES; i++)
    {
        #define houseid i
        new fstring2[100];
        format(fstring2, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring2))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring2, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring2, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring2, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring2, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring2, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring2, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring2, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring2, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring2, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring2, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring2, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring2, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring2, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring2, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring2, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring2, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring2, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring2, "HV_PosA");
            #undef houseid
            a++;
        }
    }
    printf(" Se han cargado %d casas",a);
    return 1;
}

forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
    new str[100];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        for(new j = 0; j < MAX_HOUSES; j++)
        {
            if(IsPlayerInRangeOfPoint(j,2.0, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir])
            {
                if(HouseInfo[j][hOwned])
                    format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]);
                else
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]);
                GameTextForPlayer(i, str, 2000, 3);
            }
         }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/buyhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "ERROR: This house is already owned");
                if(GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, COLOR_RED, "ERROR: You don't have enough money for this");

                HouseInfo[i][hOwned] = true;
                strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName));
                GivePlayerMoney(playerid, -HouseInfo[i][hPrice]);
                SendClientMessage(playerid, COL_ORANGE, "SERVER: You have bought this house");
                SaveHouse(i);
                LoadHouseVisual(i, true);
                return 1;
            }
        }
    }
    if(!strcmp(cmdtext, "/sellhouse", true))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        for(new i = 0; i < MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
            {
                if(!strcmp(HouseInfo[i][hOwner], pName, false))
                {
                    strmid(HouseInfo[i][hOwner], "For Sale", 0, false, 8);
                    HouseInfo[i][hOwned] = false;
                    GivePlayerMoney(playerid, HouseInfo[i][hPrice]/2);
                    SendClientMessage(playerid, COL_ORANGE, "SERVER: You have sold your house");
                    SaveHouse(i);
                    LoadHouseVisual(i, true);
                    return 1;
                }
             }
        }
    }
    if(!strcmp(cmdtext, "/housecar", true))
    {
        new pName[MAX_PLAYER_NAME], Float:X, Float:Y, Float:Z;
        new houseid = cmdtext[10];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        if(!strcmp(HouseInfo[houseid][hOwner], pName, false)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not owned of this house");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in an vehicle");
        GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
        new Float:A;
        GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
        HouseInfo[houseid][hVecX] = X;
        HouseInfo[houseid][hVecY] = Y;
        HouseInfo[houseid][hVecZ] = Z;
        HouseInfo[houseid][hVecA] = A;
        return 1;
    }
    return 0;
}

//==============================================================================

stock LoadHouse(houseid)
{
    for(new houseid=0; houseid < MAX_HOUSES; houseid++)
    {
        new fstring2[100];
        format(fstring2, 10, "Houses/%d", houseid);
        if(dini_Exists(fstring2))
        {
            HouseInfo[houseid][hEnterX] = dini_Float(fstring2, "EnterX");
            HouseInfo[houseid][hEnterY] = dini_Float(fstring2, "EnterY");
            HouseInfo[houseid][hEnterZ] = dini_Float(fstring2, "EnterZ");
            HouseInfo[houseid][hExitX] = dini_Float(fstring2, "ExitX");
            HouseInfo[houseid][hExitY] = dini_Float(fstring2, "ExitY");
            HouseInfo[houseid][hExitZ] = dini_Float(fstring2, "ExitZ");
            HouseInfo[houseid][hInsideInt] = dini_Int(fstring2, "InsideInt");
            HouseInfo[houseid][hInsideVir] = dini_Int(fstring2, "InsideVir");
            HouseInfo[houseid][hOutsideInt] = dini_Int(fstring2, "OutsideInt");
            HouseInfo[houseid][hOutsideVir] = dini_Int(fstring2, "OutsideVir");
            HouseInfo[houseid][hOwned] = dini_Bool(fstring2, "Owned") ? true : false;
        //  HouseInfo[houseid][hOwner] = dini_Get(ffstring2, "Owner");
            HouseInfo[houseid][hPrice] = dini_Int(fstring2, "Price");
            HouseInfo[houseid][hVecModel] = dini_Int(fstring2, "HV_Model");
            HouseInfo[houseid][hVecX] = dini_Float(fstring2, "HV_PosX");
            HouseInfo[houseid][hVecY] = dini_Float(fstring2, "HV_PosZ");
            HouseInfo[houseid][hVecZ] = dini_Float(fstring2, "HV_PosZ");
            HouseInfo[houseid][hVecA] = dini_Float(fstring2, "HV_PosA");
        }
        if(houseid == MAX_HOUSES-1) printf(" Se han cargado %d casas",i);
    }
}

stock LoadHouseVisual(houseid, bool:reload = false)
{
    if(reload)
    {
        DestroyDynamicMapIcon(HouseInfo[houseid][hIcon]);
        DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
        DestroyVehicle(HouseCar[houseid]);
    }
    if(!HouseInfo[houseid][hOwned])
    {

        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    else
    {

        HouseInfo[houseid][hIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], 31, 0, HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
        HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ], HouseInfo[houseid][hOutsideVir], HouseInfo[houseid][hOutsideInt]);
    }
    if(IsValidVehicleModel(HouseInfo[houseid][hVecModel]))
    {
        HouseCar[houseid] = CreateVehicle(HouseInfo[houseid][hVecModel], HouseInfo[houseid][hVecX], HouseInfo[houseid][hVecY], HouseInfo[houseid][hVecZ], HouseInfo[houseid][hVecA], -1, -1, -1);
    }
}

stock IsValidVehicleModel(vehiclemodel)
{
    if(vehiclemodel >= 400 && vehiclemodel <= 611)
    {
        return true;
    }
    return false;
}

stock SaveHouse(houseid)
{
    dini_FloatSet(fstring, "EnterX", HouseInfo[houseid][hEnterX]);
    dini_FloatSet(fstring, "EnterY", HouseInfo[houseid][hEnterY]);
    dini_FloatSet(fstring, "EnterZ", HouseInfo[houseid][hEnterZ]);
    dini_FloatSet(fstring, "ExitX", HouseInfo[houseid][hExitX]);
    dini_FloatSet(fstring, "ExitY", HouseInfo[houseid][hExitY]);
    dini_FloatSet(fstring, "ExitZ", HouseInfo[houseid][hExitZ]);
    dini_IntSet(fstring, "InsideInt", HouseInfo[houseid][hInsideInt]);
    dini_IntSet(fstring, "InsideVir", HouseInfo[houseid][hInsideVir]);
    dini_IntSet(fstring, "OutsideInt", HouseInfo[houseid][hOutsideInt]);
    dini_IntSet(fstring, "OutsideVir", HouseInfo[houseid][hOutsideVir]);
    dini_BoolSet(fstring, "Owned", HouseInfo[houseid][hOwned]);
    //HouseInfo[houseid][hOwner] = dini_Get(fstring, "Owner");
    dini_IntSet(fstring, "Price", HouseInfo[houseid][hPrice]);
    dini_IntSet(fstring, "HV_Model", HouseInfo[houseid][hVecModel]);
    dini_FloatSet(fstring, "HV_PosX", HouseInfo[houseid][hVecX]);
    dini_FloatSet(fstring, "HV_PosZ", HouseInfo[houseid][hVecY]);
    HouseInfo[houseid][hVecZ] = dini_Float(fstring, "HV_PosZ");
    HouseInfo[houseid][hVecA] = dini_Float(fstring, "HV_PosA");
}

//==============================================================================
Reply
#5

No me tira ningun error, pero simplemente pareciera que no se termina de cargar el filterscript no se porque si quieren miren denuevo, e puesto lo de Adoniiz y no me tira ningun error el complier.

Miren el log denuevo si quieren:
pawn Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team

[22:02:30]
[22:02:30] Server Plugins
[22:02:30] --------------
[22:02:30]  Loading plugin: sscanf
[22:02:30]

[22:02:30]  ===============================

[22:02:30]       sscanf plugin loaded.    

[22:02:30]          Version:  2.8.1        

[22:02:30]    (c) 2012 Alex "******" Cole  

[22:02:30]  ===============================

[22:02:30]   Loaded.
[22:02:30]  Loading plugin: mysql
[22:02:31]   Failed.
[22:02:31]  Loading plugin: streamer
[22:02:31]

*** Streamer Plugin v2.5.2 by Incognito loaded ***

[22:02:31]   Loaded.
[22:02:31]  Loaded 2 plugins.

[22:02:31]
[22:02:31] Ban list
[22:02:31] --------
[22:02:31]  Loaded: samp.ban
[22:02:31]
[22:02:31]
[22:02:31] Filterscripts
[22:02:31] ---------------
[22:02:31]   Loading filterscript 'sql&cmd.amx'...
[22:02:31]   Loading filterscript 'date.amx'...
[22:02:31]
--------------------------------------
[22:02:31] DATE SYSTEM
[22:02:31] --------------------------------------

[22:02:31]   Loading filterscript 'zones.amx'...
[22:02:31]   Unable to load filterscript 'zones.amx'.
[22:02:31]   Loading filterscript 'ZonesAndWar.amx'...
[22:02:31]
--------------------------------------
[22:02:31]  GANG ZONES CREATED!
[22:02:31] --------------------------------------

[22:02:31]   Loading filterscript 'AdminHouses.amx'...
[22:02:31]
--------------------------------------
[22:02:31]  ADMIN HOUSES LOADED SUCCESFULLY!
[22:02:31] --------------------------------------

[22:02:31]   Loading filterscript 'HOUSES.amx'...
[22:02:31]   Loaded 5 filterscripts.

[22:02:31] Number of vehicle models: 27
Reply
#6

Nadie tiene ninguna idea porque mi filter script no carga correctamente?
Reply
#7

pues a mi me sale el print, tratalo de hacer en un server en blanco, nada mas ese FS.
Reply
#8

Hablando en plan, me sigue sin cagar he echo de todo, estoy loco ajajaj.

no serias tan amable de pasarme tu carpeta con este fs puesto que suspuestamente carga.

Gracias,
Pablo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)