22.08.2011, 08:46
pawn Code:
#include <YSI\y_ini>
enum nstation
{
s1,
s2,
s3,
s4,
s5,
}
new station[nstation];
enum posinfo6
{
Float:posx,
Float:posy,
Float:posz,
};
new PosInfo6[posinfo6];
enum posinfo0
{
Float:posx,
Float:posy,
Float:posz,
};
new PosInfo0[MAX_PLAYERS][posinfo0];
enum posinfo1
{
Float:posx,
Float:posy,
Float:posz,
};
new PosInfo1[MAX_PLAYERS][posinfo1];
enum posinfo2
{
Float:posx,
Float:posy,
Float:posz,
};
new PosInfo2[MAX_PLAYERS][posinfo2];
enum posinfo3
{
Float:posx,
Float:posy,
Float:posz,
};
new PosInfo3[MAX_PLAYERS][posinfo3];
new rentcar1[MAX_PLAYERS];
new rentcar2[MAX_PLAYERS];
new rentcar3[MAX_PLAYERS];
new Locked[MAX_PLAYERS], IsLocked[MAX_VEHICLES];
new engine, lights, alarm, doors, bonnet, boot, objective;
new Float:x, Float:y, Float:z;
new timer1;
new timer2;
new timer3;
new slot;
new Float:x1, Float:y1, Float:z1;
new Float:x2, Float:y2, Float:z2;
new Float:x3, Float:y3, Float:z3;
new Float:x4, Float:y4, Float:z4;
new Float:x5, Float:y5, Float:z5;
new file1;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Car Rental System by Horrible");
print("--------------------------------------\n");
print(" = = = = = = == = = + = = [====");
print(" = = = = = = = = ====) = [=== ");
print(" = = = = = = = = =---) ==== [==== ");
print(" ----------------Version 1.4-----------------");
INI_Load("/h-rental/rental1.ini");
LoadStores();
DisableInteriorEnterExits();
for(new v = 0; v < MAX_VEHICLES; v++) IsLocked[v] = 0;
return 1;
}
CMD:createrental(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
if(sscanf(params, "i", slot)) return SendClientMessage(playerid, COLOR_GREEN, "Usage: /createrental <slot>");
if(slot < 1 || slot > 5) return SendClientMessage(playerid, COLOR_GREEN, "Invalid slot Id, (1 - 5)");
if(slot == 1)
{
file1 = INI_Open("/h-rental/rental1.ini");
DestroyPickup(station[s1]);
GetPlayerPos(playerid, x1, y1, z1);
PosInfo6[posx] = x1;
PosInfo6[posy] = y1;
PosInfo6[posz] = z1;
INI_WriteFloat(file1, "X1", PosInfo6[posx]);
INI_WriteFloat(file1, "Y1", PosInfo6[posy]);
INI_WriteFloat(file1, "Z1", PosInfo6[posz]);
station[s1] = CreatePickup(1318, 1, x1,y1,z1, 0);
INI_Close(file1);
}
stock LoadStores()
{
new ini;
ini = INI_Open("rental1.ini");
station[s1] = CreatePickup(1318, 1, PosInfo6[posx],PosInfo6[posy],PosInfo6[posz], 0);
INI_Close(ini);
return 1;
}
return 1;
}
can someone help?
i think this problem is about can't load the float from .ini file
Help please....