23.09.2014, 07:11
pawn Код:
public OnDoorLoad()
{
for(new dd = 0; dd < cache_num_rows(); dd++)
{
cache_get_field_content(0, "Created", DynamicDoor[dd][ddCreated], mysql, 10);
cache_get_field_content(0, "Owner",DynamicDoor[dd][ddOwner] , mysql, 32);
cache_get_field_content(0, "Name",DynamicDoor[dd][ddName], mysql, 32);
cache_get_field_content(0, "Password",DynamicDoor[dd][ddPassword], mysql, 129);
cache_get_field_content(0, "PassSwitch",DynamicDoor[dd][ddPasswordSwitch], mysql, 10);
DynamicDoor[dd][ddEnt][0] = cache_get_field_content_float(0, "Entry_X");
DynamicDoor[dd][ddEnt][1] = cache_get_field_content_float(0, "Entry_Y");
DynamicDoor[dd][ddEnt][2] = cache_get_field_content_float(0, "Entry_Y");
DynamicDoor[dd][ddEnt][3] = cache_get_field_content_float(0, "Entry_Z");
DynamicDoor[dd][ddEntVW] = cache_get_field_content_int(0, "Entry_VW");
DynamicDoor[dd][ddEntInt] = cache_get_field_content_int(0, "Entry_Int");
DynamicDoor[dd][ddEx][0] = cache_get_field_content_float(0, "Ex_X");
DynamicDoor[dd][ddEx][1] = cache_get_field_content_float(0, "Ex_Y");
DynamicDoor[dd][ddEx][2] = cache_get_field_content_float(0, "Ex_Z");
DynamicDoor[dd][ddEx][3] = cache_get_field_content_float(0, "Ex_A");
DynamicDoor[dd][ddExVW] = cache_get_field_content_int(0, "Ex_VW");
DynamicDoor[dd][ddExInt] = cache_get_field_content_int(0, "Ex_Int");
DynamicDoor[dd][ddExPickup] = CreateDynamicPickup(1318, 1, DynamicDoor[dd][ddEx][0], DynamicDoor[dd][ddEx][1], DynamicDoor[dd][ddEx][2], DynamicDoor[dd][ddExVW], DynamicDoor[dd][ddExInt], -1, 100.0);
DynamicDoor[dd][ddEntPickup] = CreateDynamicPickup(1318, 1, DynamicDoor[dd][ddEnt][0], DynamicDoor[dd][ddEnt][1], DynamicDoor[dd][ddEnt][2],-1);
}
print("Doors Loaded");
return 1;
}