25.02.2016, 23:07
El pickup de un dynamic door que estoy testeando no se quiere guardar y no entiendo el porq al crear la puerta se guarda pero cuando se reinicia el servidor igual puedo usar la puerta pero el pickup y label no estan aqui el codigo:
Este es el codigo que crea el pickup:
Este es el codigo de cargar el script:
Este es el codigo que crea el pickup:
Quote:
stock CreateDynamicDoor(doorid) { if(IsValidDynamicPickup(DoorData[doorid][ddPickupID])) DestroyPickupEx(DoorData[doorid][ddPickupID]); if(IsValidDynamic3DTextLabel(DoorData[doorid][ddTextID])) DestroyDynamic3DTextLabel(DoorData[doorid][ddTextID]); new string[128]; format(string, sizeof(string), "\n\n\n%s\n(( '/enter' or 'Y' ))",DoorData[doorid][ddDescription]); switch(DoorData[doorid][ddColor]) { case -1:{ /* Disable 3d Textdraw */ } case 1:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWWHITE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 2:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWPINK, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 3:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWRED, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 4:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWBROWN, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 5:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWGRAY, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 6:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWOLIVE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 7:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWPURPLE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 8:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWORANGE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 9:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWAZURE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 10:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWGREEN, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 11:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWBLUE, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} case 12:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_TWBLACK, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} default:{DoorData[doorid][ddTextID] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[doorid][ddExteriorVW], DoorData[doorid][ddExteriorInt], -1);} } switch(DoorData[doorid][ddPickupModel]) { case -1: { /* Disable Pickup */ } case 1:{DoorData[doorid][ddPickupID] = CreatePickupEx(1210, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 2:{DoorData[doorid][ddPickupID] = CreatePickupEx(1212, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 3:{DoorData[doorid][ddPickupID] = CreatePickupEx(1239, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 4:{DoorData[doorid][ddPickupID] = CreatePickupEx(1240, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 5:{DoorData[doorid][ddPickupID] = CreatePickupEx(1241, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 6:{DoorData[doorid][ddPickupID] = CreatePickupEx(1242, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 7:{DoorData[doorid][ddPickupID] = CreatePickupEx(1247, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 8:{DoorData[doorid][ddPickupID] = CreatePickupEx(1248, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 9:{DoorData[doorid][ddPickupID] = CreatePickupEx(1252, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 10:{DoorData[doorid][ddPickupID] = CreatePickupEx(1253, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 11:{DoorData[doorid][ddPickupID] = CreatePickupEx(1254, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 12:{DoorData[doorid][ddPickupID] = CreatePickupEx(1313, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 13:{DoorData[doorid][ddPickupID] = CreatePickupEx(1272, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 14:{DoorData[doorid][ddPickupID] = CreatePickupEx(1273, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 15:{DoorData[doorid][ddPickupID] = CreatePickupEx(1274, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 16:{DoorData[doorid][ddPickupID] = CreatePickupEx(1275, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 17:{DoorData[doorid][ddPickupID] = CreatePickupEx(1276, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 18:{DoorData[doorid][ddPickupID] = CreatePickupEx(1277, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 19:{DoorData[doorid][ddPickupID] = CreatePickupEx(1279, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 20:{DoorData[doorid][ddPickupID] = CreatePickupEx(1314, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 21:{DoorData[doorid][ddPickupID] = CreatePickupEx(1316, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 22:{DoorData[doorid][ddPickupID] = CreatePickupEx(1317, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 23:{DoorData[doorid][ddPickupID] = CreatePickupEx(1559, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 24:{DoorData[doorid][ddPickupID] = CreatePickupEx(1582, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} case 25:{DoorData[doorid][ddPickupID] = CreatePickupEx(2894, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]);} default: { DoorData[doorid][ddPickupID] = CreatePickupEx(1318, 23, DoorData[doorid][ddExteriorX], DoorData[doorid][ddExteriorY], DoorData[doorid][ddExteriorZ], DoorData[doorid][ddExteriorVW]); } } } |
Quote:
forward OnLoadDynamicDoors(); public OnLoadDynamicDoors() { new string[512], iIndex = 0; new rows, fields; cache_get_data(rows, fields, g_iConnectionHandle[0]); while(iIndex<rows) { for(new field;field<fields;field++) { cache_get_row(iIndex, field, string, g_iConnectionHandle[0], sizeof string); switch(field) { case 0: DoorData[iIndex][ddSQLId] = strval(string); case 1: format(DoorData[iIndex][ddDescription], 128, "%s", string); case 2: DoorData[iIndex][ddCustomInterior] = strval(string); case 3: DoorData[iIndex][ddExteriorVW] = strval(string); case 4: DoorData[iIndex][ddExteriorInt] = strval(string); case 5: DoorData[iIndex][ddInteriorVW] = strval(string); case 6: DoorData[iIndex][ddInteriorInt] = strval(string); case 7: DoorData[iIndex][ddExteriorX] = floatstr(string); case 8: DoorData[iIndex][ddExteriorY] = floatstr(string); case 9: DoorData[iIndex][ddExteriorZ] = floatstr(string); case 10: DoorData[iIndex][ddExteriorA] = floatstr(string); case 11: DoorData[iIndex][ddInteriorX] = floatstr(string); case 12: DoorData[iIndex][ddInteriorY] = floatstr(string); case 13: DoorData[iIndex][ddInteriorZ] = floatstr(string); case 14: DoorData[iIndex][ddInteriorA] = floatstr(string); case 15: DoorData[iIndex][ddCustomExterior] = strval(string); case 16: DoorData[iIndex][ddVIP] = strval(string); case 17: DoorData[iIndex][ddFamily] = strval(string); case 18: DoorData[iIndex][ddFaction] = strval(string); case 19: DoorData[iIndex][ddAdmin] = strval(string); case 20: DoorData[iIndex][ddWanted] = strval(string); case 21: DoorData[iIndex][ddVehicleAble] = strval(string); case 22: DoorData[iIndex][ddColor] = strval(string); case 23: DoorData[iIndex][ddPickupModel] = strval(string); case 24: format(DoorData[iIndex][dPass], 24, "%s", string); case 25: DoorData[iIndex][dLocked] = strval(string); } } if(strlen(DoorData[iIndex][ddDescription]) > 0) { CreateDynamicDoor(iIndex); } iIndex++; } if(iIndex > 0) printf("[MySQL] %d doors rehashed/loaded.", iIndex); else printf("[MySQL] Failed to load any doors."); return 1; } |