19.10.2013, 22:57
Hello ear samp members.
I need help from You, maybe you could help me out..
So i have made my public etc...
And I have my question how can I save it as %d and it counts next number which are unused.
Second question is how can I save a VW for a player..
GetVirtualWorld(but next idk..)
here is my public:
With best regards Scrillex.
I need help from You, maybe you could help me out..
So i have made my public etc...
And I have my question how can I save it as %d and it counts next number which are unused.
Second question is how can I save a VW for a player..
GetVirtualWorld(but next idk..)
here is my public:
pawn Code:
//
forward CreateHouse(playerid, costs, sells, interior , virtualworld);
public CreateHouse(playerid, costs, sells, interior , virtualworld)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
new INI:HouseFile = INI_Open(HousePath());
HouseCount++;
hInfo[playerid][hEnterX] = X;
hInfo[playerid][hEnterY] = Y;
hInfo[playerid][hEnterZ] = Z;
hInfo[playerid][hInterior] = interior;
hInfo[playerid][hCost] = costs;
hInfo[playerid][hSell] = sells;
hInfo[playerid][hVW] = virtualworld;
INI_WriteFloat(HouseFile, "EnterenceX", hInfo[playerid][hEnterX]);
INI_WriteFloat(HouseFile, "EnterenceY", hInfo[playerid][hEnterY]);
INI_WriteFloat(HouseFile, "EnterenceZ", hInfo[playerid][hEnterZ]);
INI_WriteFloat(HouseFile, "ExitX", 0);
INI_WriteFloat(HouseFile, "ExitY", 0);
INI_WriteFloat(HouseFile, "ExitZ", 0);
INI_WriteInt(HouseFile, "Interior", hInfo[playerid][hInterior]);
INI_WriteInt(HouseFile, "VW", hInfo[playerid][hVW]);
INI_WriteInt(HouseFile, "Cost", hInfo[playerid][hCost]);
INI_WriteInt(HouseFile, "Sell", hInfo[playerid][hSell]);
INI_WriteString(HouseFile, "Phone", hInfo[playerid][hPhone]);
INI_WriteInt(HouseFile, "Garderobe", hInfo[playerid][hGarderobe]);
INI_WriteInt(HouseFile, "Garderobe1", hInfo[playerid][hGarderobe1]);
INI_WriteInt(HouseFile, "Storage", hInfo[playerid][hStorage]);
INI_WriteInt(HouseFile, "Storage1", hInfo[playerid][hStorage1]);
INI_WriteInt(HouseFile, "Storage2", hInfo[playerid][hStorage2]);
INI_WriteInt(HouseFile, "Storage3", hInfo[playerid][hStorage3]);
INI_WriteInt(HouseFile, "Storage4", hInfo[playerid][hStorage4]);
INI_WriteInt(HouseFile, "Storage5", hInfo[playerid][hStorage5]);
INI_WriteInt(HouseFile, "Storage6", hInfo[playerid][hStorage6]);
INI_WriteInt(HouseFile, "Storage7", hInfo[playerid][hStorage7]);
INI_WriteInt(HouseFile, "Storage8", hInfo[playerid][hStorage8]);
INI_WriteInt(HouseFile, "Storage9", hInfo[playerid][hStorage9]);
INI_WriteInt(HouseFile, "Storage10", hInfo[playerid][hStorage10]);
INI_WriteInt(HouseFile, "Money", hInfo[playerid][hMoney]);
INI_WriteInt(HouseFile, "Drugs", hInfo[playerid][hDrugs]);
INI_WriteInt(HouseFile, "Drugs1", hInfo[playerid][hDrugs1]);
INI_WriteInt(HouseFile, "Drugs2", hInfo[playerid][hDrugs2]);
INI_WriteInt(HouseFile, "Drugs3", hInfo[playerid][hDrugs3]);
INI_WriteInt(HouseFile, "Drugs4", hInfo[playerid][hDrugs4]);
INI_WriteInt(HouseFile, "Drugs5", hInfo[playerid][hDrugs5]);
INI_WriteInt(HouseFile, "Drugs6", hInfo[playerid][hDrugs6]);
INI_WriteInt(HouseFile, "Drugs7", hInfo[playerid][hDrugs7]);
INI_WriteInt(HouseFile, "Drugs8", hInfo[playerid][hDrugs8]);
INI_WriteInt(HouseFile, "Drugs9", hInfo[playerid][hDrugs9]);
INI_WriteInt(HouseFile, "Drugs10", hInfo[playerid][hDrugs10]);
INI_WriteInt(HouseFile, "Drugs11", hInfo[playerid][hDrugs11]);
INI_WriteInt(HouseFile, "Products", hInfo[playerid][hProducts]);
INI_WriteInt(HouseFile, "Products1", hInfo[playerid][hProducts1]);
INI_WriteInt(HouseFile, "Products2", hInfo[playerid][hProducts2]);
INI_WriteInt(HouseFile, "Products3", hInfo[playerid][hProducts3]);
INI_WriteInt(HouseFile, "Products4", hInfo[playerid][hProducts4]);
INI_WriteInt(HouseFile, "Products5", hInfo[playerid][hProducts5]);
INI_WriteInt(HouseFile, "Products6", hInfo[playerid][hProducts6]);
INI_WriteInt(HouseFile, "Products7", hInfo[playerid][hProducts7]);
INI_WriteInt(HouseFile, "Products8", hInfo[playerid][hProducts8]);
INI_WriteInt(HouseFile, "Products9", hInfo[playerid][hProducts9]);
INI_WriteInt(HouseFile, "Products10", hInfo[playerid][hProducts10]);
INI_WriteInt(HouseFile, "Products11", hInfo[playerid][hProducts11]);
}
forward LoadHouse_data(playerid, name[], value[]);
public LoadHouse_data(playerid, name[], value[])
{
new Name[24];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
INI_String("Owner", Name, 48);
INI_Float("EnterenceX", hInfo[playerid][hEnterX]);
INI_Float("EnterenceY", hInfo[playerid][hEnterY]);
INI_Float("EnterenceZ", hInfo[playerid][hEnterZ]);
INI_Float("ExitX", hInfo[playerid][hExitX]);
INI_Float("ExitY", hInfo[playerid][hExitY]);
INI_Float("ExitZ", hInfo[playerid][hExitZ]);
INI_Int("Interior", hInfo[playerid][hInterior]);
INI_Int("VW", hInfo[playerid][hVW]);
INI_Int("Cost", hInfo[playerid][hCost]);
INI_Int("Sell", hInfo[playerid][hSell]);
INI_String("Phone", hInfo[playerid][hPhone], 16);
INI_Int("Garderobe", hInfo[playerid][hGarderobe]);
INI_Int("Garderobe1", hInfo[playerid][hGarderobe1]);
INI_Int("Storage", hInfo[playerid][hStorage]);
INI_Int("Storage1", hInfo[playerid][hStorage1]);
INI_Int("Storage2", hInfo[playerid][hStorage2]);
INI_Int("Storage3", hInfo[playerid][hStorage3]);
INI_Int("Storage4", hInfo[playerid][hStorage4]);
INI_Int("Storage5", hInfo[playerid][hStorage5]);
INI_Int("Storage6", hInfo[playerid][hStorage6]);
INI_Int("Storage7", hInfo[playerid][hStorage7]);
INI_Int("Storage8", hInfo[playerid][hStorage8]);
INI_Int("Storage9", hInfo[playerid][hStorage9]);
INI_Int("Storage10", hInfo[playerid][hStorage10]);
INI_Int("Money", hInfo[playerid][hMoney]);
INI_Int("Drugs", hInfo[playerid][hDrugs]);
INI_Int("Drugs1", hInfo[playerid][hDrugs1]);
INI_Int("Drugs2", hInfo[playerid][hDrugs2]);
INI_Int("Drugs3", hInfo[playerid][hDrugs3]);
INI_Int("Drugs4", hInfo[playerid][hDrugs4]);
INI_Int("Drugs5", hInfo[playerid][hDrugs5]);
INI_Int("Drugs6", hInfo[playerid][hDrugs6]);
INI_Int("Drugs7", hInfo[playerid][hDrugs7]);
INI_Int("Drugs8", hInfo[playerid][hDrugs8]);
INI_Int("Drugs9", hInfo[playerid][hDrugs9]);
INI_Int("Drugs10", hInfo[playerid][hDrugs10]);
INI_Int("Drugs11", hInfo[playerid][hDrugs11]);
INI_Int("Products", hInfo[playerid][hProducts]);
INI_Int("Products1", hInfo[playerid][hProducts1]);
INI_Int("Products2", hInfo[playerid][hProducts2]);
INI_Int("Products3", hInfo[playerid][hProducts3]);
INI_Int("Products4", hInfo[playerid][hProducts4]);
INI_Int("Products5", hInfo[playerid][hProducts5]);
INI_Int("Products6", hInfo[playerid][hProducts6]);
INI_Int("Products7", hInfo[playerid][hProducts7]);
INI_Int("Products8", hInfo[playerid][hProducts8]);
INI_Int("Products9", hInfo[playerid][hProducts9]);
INI_Int("Products10", hInfo[playerid][hProducts10]);
INI_Int("Products11", hInfo[playerid][hProducts11]);
return 1;
}