22.05.2016, 19:07
I have made a dynamic doors system but the problem is that it won't load it, maybe you guys are able to help me.
PHP код:
forward LoadDoor_data(idx, name[], value[]);
public LoadDoor_data(idx, name[], value[])
{
INI_String("DoorName", DoorInfo[idx][dName], 128);
INI_Int("Pickup", DoorInfo[idx][dPickup]);
INI_Int("PickupModel", DoorInfo[idx][dPickupModel]);
INI_Float("EnterX", DoorInfo[idx][dEnterX]);
INI_Float("EnterY", DoorInfo[idx][dEnterY]);
INI_Float("EnterZ", DoorInfo[idx][dEnterZ]);
INI_Float("ExitX", DoorInfo[idx][dExitX]);
INI_Float("ExitY", DoorInfo[idx][dExitY]);
INI_Float("ExitZ", DoorInfo[idx][dExitZ]);
INI_Int("Interior", DoorInfo[idx][dInt]);
INI_Int("ExitVW", DoorInfo[idx][dExitVW]);
INI_Int("ExitInterior", DoorInfo[idx][dExitInt]);
INI_Int("EnterInterior", DoorInfo[idx][dEnterInt]);
return 1;
}
PHP код:
}
for(new idz = 1; idz < sizeof(DoorInfo); idz++)
{
new string[128];
format(string, sizeof(string), DPATH, idz);
INI_ParseFile(string, "LoadDoor_%s", .bExtra = true, .extra = idz );
format(string, sizeof(string), "[%s]\nID: %d\nPress C to enter.",DoorInfo[idz][dName], idz);
DoorInfo[idz][dLabel] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, DoorInfo[idz][dEnterX], DoorInfo[idz][dEnterY], DoorInfo[idz][dEnterZ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 50.0);
DoorInfo[idz][dPickup] = CreateDynamicPickup(19130, 23, DoorInfo[idz][dEnterX], DoorInfo[idz][dEnterY], DoorInfo[idz][dEnterZ], 0, 0, -1, 50.0);
}
return 1;