House Help
#1

Код:
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(86) : error 017: undefined symbol "hOutsideInt"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(95) : error 017: undefined symbol "SaveHouse"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(108) : error 017: undefined symbol "hOutsideInt"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(116) : error 017: undefined symbol "SaveHouse"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(129) : error 017: undefined symbol "SendclientMessage"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(132) : error 017: undefined symbol "A"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(136) : error 017: undefined symbol "A"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(264) : error 017: undefined symbol "hOutsideVir"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(265) : error 017: undefined symbol "hOutsideVir"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(269) : error 017: undefined symbol "hOutsideVir"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(270) : error 017: undefined symbol "hOutsideVir"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(272) : error 017: undefined symbol "IsValidVehicleModel"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(274) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(274) : error 017: undefined symbol "IsValidVehicleModel"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(276) : error 017: undefined symbol "vehiclemodel"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(280) : warning 225: unreachable code
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(280) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(280) : error 017: undefined symbol "SaveHouse"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(282) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(283) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(284) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(285) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(286) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(287) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(288) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(289) : error 017: undefined symbol "fstring"
C:\Documents and Settings\Lenovo\Desktop\New Briefcase\Las Venturas Roleplay\gamemodes\LVR.pwn(290) : error 017: undefined symbol "fstring"
Код:
/*
                   ***** Five Star General Community
                        Las Venturas Unique Roleplay
                        Developer - trapstar2020
     Contact:fsgc.ucoz.com,fivestargc@hotmail.com,fivestargc@yahoo.com
     Information: Pure script Created From Scratch.
*/
//=====================================INCLUDES=================================
#include <a_samp>
#include <streamer>
#include <core>
#include <Dini>
//=======================================END====================================
//====================================#DEFINE(SCRIPT)===========================
#define GAMEMODE	"Roleplay"
#define GAMEMODE_USE_VERSION	"No"
#define MAP_NAME	"Las Venturas"
#define SERVER_NAME	"Las Venturas Unique Style Roleplay"
#define WEBSITE	"www.gtalvusr.ucoz.com"
#define VERSION	"0.1"
#define LAST_UPDATE	"12/10/11"
#define DEVELOPER	"trapstar2020"
#define PASSWORD	"superstar7"
#define SCRIPT_LINES  127
//======================================END=====================================
//====================================#DEFINE(COLOURS)==========================
#define COLOR_RED 0xAA3333AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_GREEN 0x00FF00AA
//===================================House======================================
#define MAX_HOUSES 2000
//====================================END=======================================
//==========================================NEW=================================
new tCar[ 14 ];
new hqgate0;
new hqgate1;
//===================================Enum+New===================================
enum pInfo
{
	pname,
	pBronze,
	pSilver,
	pGold,
	pPremium,
	pDonator,
	pLevel,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
enum hInfo
{
    Float:hEnterX, //Entrance X. It's an float! example: 0.0000000. I'm gonna use the same with the other entrances/exits
    Float:hEnterY,
    Float:hEnterZ,
    Float:hExitX,
    Float:hExitY,
    Float:hExitZ,
    InsideInt, //The inside interior.. DUH!
    InsideVir, //Already subscribed above
    OutsideInt,
    OutsideVir,
    bool:hOwned, //boolean! Is house owned? NO = False, YES = True
    hOwner[MAX_PLAYER_NAME], //The house owner! I'm gonna use MAX_PLAYER_NAME, because a player can't have a longer name :')
    hPrice, //Will store the price
    hPickup, //The pickup. This is used to remove/move the pickup icon!
    hIcon, 
    hVecModel, 
    Float:hVecX, 
    Float:hVecY,
    Float:hVecZ,
    Float:hVecA
};
new HouseInfo[MAX_HOUSES][hInfo];
new HouseCar[MAX_HOUSES];
//=====================================END======================================
//============================OnPlayerCommandText===============================
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/buyhouse", true))
{
    new pName[MAX_PLAYER_NAME]; //For the player's name - For the house
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME); //Get the name of the player and store it in pName
    for(new i = 0; i < MAX_HOUSES; i++) //Last time I'm gonna say it: Loop through all the houses
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir]) //Is player near house entrance, and if player is in interior of that house + virtual world (Last time I said this too!)
        {
            if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "This house is already owned!"); //Is the house owned? Then send message that it's owned and stop.
            if(GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money for this!"); //Has player too less money? Send him a message!

            HouseInfo[i][hOwned] = true; //The house is owned, where the player used /buyhouse
            strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName)); //Put the players name into the "hOwner" of the house
            GivePlayerMoney(playerid, -HouseInfo[i][hPrice]); //Remove some money of the player.. The value of the house
            SendClientMessage(playerid, COLOR_GREEN, "House bought!"); //Send the player an message.
            SaveHouse(i);
            LoadHouseVisual(i, true); //Load House Visual. Now, I've added ', true': It will RELOAD now!
            return 1;
        }
    }
    return 1;
}
if(!strcmp(cmdtext, "/sellhouse", true))
{
    new pName[MAX_PLAYER_NAME]; //See /buyhouse
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME); //See new 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)) //Is the owner of the house the same as the players name (is the player the owner?? !)
            {
                strmid(HouseInfo[i][hOwner], "For Sale", 0, false, 8); //Set the owner of the house to "For Sale"
                HouseInfo[i][hOwned] = false; //House is not owner anymore!
                GivePlayerMoney(playerid, HouseInfo[i][hPrice]/2); //Give the player 50% of the house value back!
                SendClientMessage(playerid, COLOR_GREEN, "House sold!");
                SaveHouse(i);
                LoadHouseVisual(i, true); //Load House Visual. Now, I've added ', true': It will RELOAD now!
                return 1;
            }
         }
    }
    return 1;
}
if(!strcmp(cmdtext, "/tphousecar", true))
{
    new pName[MAX_PLAYER_NAME], Float:X, Float:Y, Float:Z;
    new houseid = cmdtext[10]; //The param. /tphousecar is 0-8. With a space, 9. Then, the param is at 10.
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(!strcmp(HouseInfo[houseid][hOwner], pName, false)) return SendclientMessage(playerid, COLOR_RED, "You are not the owner of the house!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be in an vehicle!"); //if is player not in an vehicle, send an message and stop (RETURN [message])
    GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
    HouseInfo[houseid][hVecX] = X;
    HouseInfo[houseid][hVecY] = Y;
    HouseInfo[houseid][hVecZ] = Z;
    HouseInfo[houseid][hVecA] = A;
    return 1;
}


return 0;
}
//==================================END=========================================
//============================OnDialogResponse==================================
//===================================End========================================
main()
{
	print("______________________Unique Style Roleplay______________________");
	printf("> %s - %s by %s loaded", GAMEMODE,MAP_NAME,DEVELOPER);
	printf("> Server Name: %s", SERVER_NAME);
	if (!strcmp("Yes", GAMEMODE_USE_VERSION, true)) { printf("> Gamemode: %s - %s", GAMEMODE,VERSION); } else { printf("> Gamemode: %s", GAMEMODE); }
	printf("> Version: %s", VERSION);
	printf("> Map: %s", MAP_NAME);
	printf("> Website: %s", WEBSITE);
	printf("> Developer: %s", DEVELOPER);
	printf("> Last Update: %s", LAST_UPDATE);
	printf("> Current Script Lines: %d", SCRIPT_LINES);
 	printf("> Password: %s", ShowServerPassword());
	print("_________________________________________________________________________");
}
stock ShowServerPassword()
{
	new pass[128];
	if (strlen(PASSWORD) != 0)
	{
		format(pass, sizeof pass, "%s", PASSWORD);
	}
	else
	{
	    pass = "None";
	}
	return pass;
}
//==================================GameModINT(START)===========================
public OnGameModeInit()
{
//===================================CREATEDOBJECTS=============================
//========================================CarDealership=========================
CreateObject(1274, 2200.6999511719, 1394.9000244141, 11.10000038147, 0, 0, 0);//entrance
CreateDynamicObject(1274, 1402.795898437, 7.429048538208, 1001.3007202148, 0, 0,0, 1);//exit
CreateDynamicObject(1423, 1417.2789306641, 7.0263347625732, 6.9560832977295, 0, 0, 0, 1);//blocker
CreateDynamicObject(1423, 1417.3079833984, 6.9560832977295, 1008.8571777344, 0, 0, 0, 1);//block
CreateDynamicObject(1318, 1418.8009033203, -15.561309814453, 1000.4258422852, 0, 0, 0, 1);//testing vehicle leave compound
CreateDynamicObject(1998, 1404.0356445313, -44.34838867187, 999.91119384766, 0 , 0, 0, 1);//Desk1
CreateDynamicObject(1998, 1360.8813476563, -37.314525604248, 999.921875, 0, 0, 270, 1);//2
CreateDynamicObject(1998, 1418.3614501953, -2.975700378418, 999.92718505859, 0 , 0, 90, 1);//3
CreateDynamicObject(1998, 1368.630859375, 4.9084949493408, 999.91979980469, 0, 0, 180, 1);//4
CreateDynamicObject(1671, 1367.6968994141, 5.0326824188232, 1000.3806762695, 0, 0, 0, 1);//chairs1
CreateDynamicObject(1671, 1360.4177246094, -38.369777679443, 1000.3820800781, 0, 0, 90, 1);//2
CreateDynamicObject(1671, 1404.7895507813, -44.462558746338, 1000.3713378906, 0 , 0, 180, 1);//3
CreateDynamicObject(1671, 1418.8614501953, -2.0616588592529, 1000.3876342773, 0 , 0, 270, 1);//4
tCar[ 0 ] = CreateVehicle(411,1411.5029296875,2.939453125,1000.7236328125,115,0,0,15);
tCar[ 1 ] = CreateVehicle(560,1414.539916992,-44.657569885254,1000.7278442383,45,0,0,15);
tCar[ 2 ] = CreateVehicle(506, 1391.6868896484,-45.354656219482,1000.7150268555,0,0,0,15);
tCar[ 3 ] = CreateVehicle(541,1361.4425048828,3.2897186279297,1000.621887207,225,0,0,15);
tCar[ 4 ] = CreateVehicle(451,1362.018554687,-45.954429626465,1000.6877441406,305,0,0,15);
tCar[ 5 ] = CreateVehicle(421,1397.29602050780,-44.513107299805,1000.9198608398,0,0,0,15);
tCar[ 6 ] = CreateVehicle(545,1385.8229980469,-44.841613769531,1000.8740234375,0,0,0,15);
tCar[ 7 ] = CreateVehicle(429,1379.8037109375,-44.887657165527,1000.6719970703,0,0,0,15);
tCar[ 8 ] = CreateVehicle(415,1373.0137939453,-44.790325164795,1000.7682495117,0,0,0,15);
tCar[ 9 ] = CreateVehicle(477,1363.1466064453,-31.947910308838,1000.7718505859,270,0,0,15);
tCar[ 10 ] = CreateVehicle(480,1363.5948486328,-25.042772293091,1000.7718505859,270,0,0,15);
tCar[ 11 ] = CreateVehicle(402,1363.8601074219,-18.526973724365,1000.8618774414,270,0,0,15);
tCar[ 12 ] = CreateVehicle(603,1363.1484375,-12.878735542297,1000.9245605469,270,0,0,15);
tCar[ 13 ] = CreateVehicle(535,1363.1125488281,-6.702467918396,1000.7619018555,270,0,0,15);
LinkVehicleToInterior(tCar[ 0 ], 1);
LinkVehicleToInterior(tCar[ 1 ], 1);
LinkVehicleToInterior(tCar[ 2 ], 1);
LinkVehicleToInterior(tCar[ 3 ], 1);
LinkVehicleToInterior(tCar[ 4 ], 1);
LinkVehicleToInterior(tCar[ 5 ], 1);
LinkVehicleToInterior(tCar[ 6 ], 1);
LinkVehicleToInterior(tCar[ 7 ], 1);
LinkVehicleToInterior(tCar[ 8 ], 1);
LinkVehicleToInterior(tCar[ 9 ], 1);
LinkVehicleToInterior(tCar[ 10 ], 1);
LinkVehicleToInterior(tCar[ 11 ], 1);
LinkVehicleToInterior(tCar[ 12 ], 1);
LinkVehicleToInterior(tCar[ 13 ], 1);
//=======================================EndOfDealship==========================
//=======================================VIPHQ==================================
hqgate0 = CreateObject(971, 2492.9870605469, 2772.6166992188, 9.9616632461548, 90, 0, 0);//hq gate
hqgate1 = CreateObject(971, 2501.8193359375, 2772.3293457031, 9.9023017883301, 90, 0, 0);//hq gate
//========================================END===================================
SetTimer("UpdatePlayersHouseInfo", 1000, true);
return 1;
}
//====================================GAMEMODINT(END)===========================
stock LoadHouse(houseid)
{
new fstring[10]; 
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; //Because it is an boolean: ? true : false;
strmid(HouseInfo[houseid][hOwner], dini_Get(fstring, "Owner"), 0, false, strlen(dini_Get("Owner"))); //Used this one instead of {string} = {string}. I've ever read that this is faster
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]);
dini_Get(fstring, "Owner", HouseInfo[houseid][hOwner]);
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]);
dini_Float(fstring, "HV_PosZ", HouseInfo[houseid][hVecZ]);
dini_Float(fstring, "HV_PosA", HouseInfo[houseid][hVecA]);
}
return 1;
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]) //Is player near house entrance, and if player is in interior of that house + virtual world
            {
                SetPlayerPos(playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hInsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hInsideVir]);
                SendClientMessage(playerid, COLOR_PURPLE, "*%s Turns the door nub and pushes the door open entering the house*");
            }
            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]) //Same as the previous IsPlayerInRangeOfPoint, but now if the player is near the house exit+int+vir
            {
                SetPlayerPos(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]);
                SetPlayerInterior(playerid, HouseInfo[i][hOutsideInt]);
                SetPlayerVirtualWorld(playerid, HouseInfo[i][hOutsideVir]);
                SendClientMessage(playerid, COLOR_PURPLE, "*%s Turns the door nub and pushes the door open exiting the house*");
            }
        }
    }
    return 1;
}
public UpdatePlayersHouseInfo()
{
    new str[100]; 
    for(new i = 0; i < MAX_PLAYERS; i++) 
    {
        for(new j = 0; j < MAX_HOUSES; j++) 
        {
            if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir]) //You already know this! If you don't know it, do step 3 again!
            {
                if(HouseInfo[j][hOwned]) 
                    format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]); //Will give: {white_color}House owned by {yellow_color}OWNER
                else 
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]); //Will give: {white_color}House for sale!{new line}Price: {green_color}$PRICE
                GameTextForPlayer(i, str, 2000, 3); 
            }
         }
    }
    return 1;
}
Reply
#2

not tested
pawn Код:
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]);
dini_Get(fstring, "Owner", HouseInfo[houseid][hOwner]);
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]);
dini_Float(fstring, "HV_PosZ", HouseInfo[houseid][hVecZ]);
dini_Float(fstring, "HV_PosA", HouseInfo[houseid][hVecA]);
}// if it doesnt work try removing this bracket to ^^
return 1;
}
but i think you forgot a bracket
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)