07.08.2016, 16:43
hola no entiendo porque no me carga el auto
si me pueden ayudar les agradesco
en la tabla me guarda todo bien pero no me carga el auto cuando reinicio la gm lee los datos pero no carga el auto
si me pueden ayudar les agradesco
Quote:
forward CargarAutos(playerid); public CargarAutos(playerid) { new veh; new V_VKEY, V_VD[24], Float:V_VPOSX, Float:V_VPOSY, Float:V_VPOSZ, Float:V_VANGLE, V_MODEL, VCOL1, VCOL2, VPAINTJOB, vm1,vm2,vm3,vm4,vm5,vm6,vm7,vm8,vm9,vm10,vm11,vm12 ,vm13,vm14,vm15,vm16,vm17,VVSTATUS,Float:VVHEALTH, VVPANELS,VVDOORS,VVLIGHTS,VVTIRES; new f[500]; cache_get_field_content(0,"vkey", f); V_VKEY = strval(f); cache_get_field_content(0,"vd", f); format(V_VD, 24, "%s", f); cache_get_field_content(0,"vposx", f); V_VPOSX = floatstr(f); cache_get_field_content(0,"vposy", f); V_VPOSY = floatstr(f); cache_get_field_content(0,"vposz", f); V_VPOSZ = floatstr(f); cache_get_field_content(0,"vangle", f); V_VANGLE = floatstr(f); cache_get_field_content(0,"vmodel", f); V_MODEL = strval(f); cache_get_field_content(0,"vcolor1", f); VCOL1 = strval(f); cache_get_field_content(0,"vcolor2", f); VCOL2 = strval(f); cache_get_field_content(0,"vpaintjob", f); VPAINTJOB = strval(f); cache_get_field_content(0,"vm1", f); vm1 = strval(f); cache_get_field_content(0,"vm2", f); vm2 = strval(f); cache_get_field_content(0,"vm3", f); vm3 = strval(f); cache_get_field_content(0,"vm4", f); vm4 = strval(f); cache_get_field_content(0,"vm5", f); vm5 = strval(f); cache_get_field_content(0,"vm6", f); vm6 = strval(f); cache_get_field_content(0,"vm7", f); vm7 = strval(f); cache_get_field_content(0,"vm8", f); vm8 = strval(f); cache_get_field_content(0,"vm9", f); vm9 = strval(f); cache_get_field_content(0,"vm10", f); vm10 = strval(f); cache_get_field_content(0,"vm11", f); vm11 = strval(f); cache_get_field_content(0,"vm12", f); vm12 = strval(f); cache_get_field_content(0,"vm13", f); vm13 = strval(f); cache_get_field_content(0,"vm14", f); vm14 = strval(f); cache_get_field_content(0,"vm15", f); vm15 = strval(f); cache_get_field_content(0,"vm16", f); vm16 = strval(f); cache_get_field_content(0,"vm17", f); vm17 = strval(f); cache_get_field_content(0,"vstatus", f); VVSTATUS = strval(f); cache_get_field_content(0,"vvida", f); VVHEALTH = floatstr(f); cache_get_field_content(0,"vpanles", f); VVPANELS = strval(f); cache_get_field_content(0,"vdoors", f); VVDOORS = strval(f); cache_get_field_content(0,"vluces", f); VVLIGHTS = strval(f); cache_get_field_content(0,"vruedas", f); VVTIRES = strval(f); new str[20]; format(str, 20, "XRP%04d", V_VKEY); format(VehicleInfo[veh][VD], 24, "%s", V_VD); VehicleInfo[veh][VKEY] = V_VKEY; VehicleInfo[veh][vposx] = V_VPOSX; VehicleInfo[veh][vposy] = V_VPOSY; VehicleInfo[veh][vposz] = V_VPOSZ; VehicleInfo[veh][vangle] = V_VANGLE; VehicleInfo[veh][vmodelid] = V_MODEL; VehicleInfo[veh][vcolor1] = VCOL1; VehicleInfo[veh][vcolor2] = VCOL2; VehicleInfo[veh][vpaintjob] = VPAINTJOB; VehicleInfo[veh][mod1] = vm1; VehicleInfo[veh][mod2] = vm2; VehicleInfo[veh][mod3] = vm3; VehicleInfo[veh][mod4] = vm4; VehicleInfo[veh][mod5] = vm5; VehicleInfo[veh][mod6] = vm6; VehicleInfo[veh][mod7] = vm7; VehicleInfo[veh][mod8] = vm8; VehicleInfo[veh][mod9] = vm9; VehicleInfo[veh][mod10] = vm10; VehicleInfo[veh][mod11] = vm11; VehicleInfo[veh][mod12] = vm12; VehicleInfo[veh][mod13] = vm13; VehicleInfo[veh][mod14] = vm14; VehicleInfo[veh][mod15] = vm15; VehicleInfo[veh][mod16] = vm16; VehicleInfo[veh][mod17] = vm17; VehicleInfo[veh][slot] = 3; VehicleInfo[veh][VSTATUS] = VVSTATUS; VehicleInfo[veh][VehicleHealth] = VVHEALTH; VehicleInfo[veh][VPanels] = VVPANELS; VehicleInfo[veh][VDoors] = VVDOORS; VehicleInfo[veh][VLights] = VVLIGHTS; VehicleInfo[veh][VTires] = VVTIRES; SetVehicleHealth(veh, VVHEALTH); ChangeVehiclePaintjob(veh, VehicleInfo[veh][vpaintjob]); ModVehicle(veh); veh = CreateVehicle(V_MODEL, V_VPOSX, V_VPOSY, V_VPOSZ, V_VANGLE, VCOL1, VCOL2, -1); SetVehicleNumberPlate(veh, str); SetVehicleToRespawn(veh); UpdateVehicleDamageStatus(veh, VVPANELS,VVDOORS,VVLIGHTS,VVTIRES); SendClientMessage(playerid, -1, "SELECT * FROM `vehicles`"); PlayerInfo[playerid][PlayerVehicle][3] = veh; //SaveValue(playerid, "VEH3", PlayerInfo[playerid][PlayerVehicle][3]); PlayerInfo[playerid][PlayerVehicleKey][3] = V_VKEY; //SaveValue(playerid, "VKEY3", PlayerInfo[playerid][PlayerVehicleKey][3]); if(VehicleInfo[veh][VSTATUS] == 1) { SetVehicleVirtualWorld(veh, playerid); SCMEx(playerid, -1, "Tiene el vehнculo {00CCFF}#%d {FFFFFF}pendiente de recogida, dirнjase al punto rojo para recogerlo.", VehicleInfo[veh][slot]); SetPlayerCheckpoint(playerid, 1751.54309, -2054.41772, 13.52704, 1.0); } else if(VehicleInfo[veh][VSTATUS] == 3) { SetVehicleVirtualWorld(veh,playerid); } else if(VehicleInfo[veh][VSTATUS] == 10 || VehicleInfo[veh][VSTATUS] == 4) { VehicleInfo[veh][VSTATUS] = 4; new Counter = 0; for(new i = 0; i < sizeof(GruasPosition); i++) { if(GruasPosition[i][GOcupado] == -1) { //DestroyVehicle(veh); veh = CreateVehicle(V_MODEL, GruasPosition[i][GPositionX], GruasPosition[i][GPositionY], GruasPosition[i][GPositionZ], GruasPosition[i][GAngle], VCOL1, VCOL2, -1); SetVehicleNumberPlate(veh, str); SetVehicleToRespawn(veh); ChangeVehiclePaintjob(veh, VehicleInfo[veh][vpaintjob]); ModVehicle(veh); UpdateVehicleDamageStatus(veh, VVPANELS,VVDOORS,VVLIGHTS,VVTIRES); SetVehicleHealth(veh, VVHEALTH); GruasPosition[i][GOcupado] = veh; Counter = 1; break; } } if(Counter == 0) { SetVehiclePos(veh, 2474.4165, -2099.6328, 13.2865); SetVehicleVirtualWorld(veh, playerid); } SetPlayerCheckpoint(playerid, 2467.223388, -2073.973632, 13.761137, 1.0); SCMEx(playerid, -1, "Tu vehнculo {00CCFF}#%d (%s) {FFFFFF}estб en el depуsito, ve allн para recogerlo ($150, punto rojo en el mapa).", VehicleInfo[veh][slot], GetVehicleName(veh)); } else if(VehicleInfo[veh][VSTATUS] == 12) { new r = random(sizeof(VehicleGruaExt)); format(str, 20, "XRP%04d", VehicleInfo[veh][VKEY]); //DestroyVehicle(veh); veh = CreateVehicle(VehicleInfo[veh][vmodelid], VehicleGruaExt[r][0], VehicleGruaExt[r][1], VehicleGruaExt[r][2], VehicleGruaExt[r][3], VehicleInfo[veh][vcolor1], VehicleInfo[veh][vcolor2], -1); SetVehicleNumberPlate(veh, str); SetVehicleToRespawn(veh); ChangeVehiclePaintjob(veh, VehicleInfo[veh][vpaintjob]); ModVehicle(veh); UpdateVehicleDamageStatus(veh, VVPANELS,VVDOORS,VVLIGHTS,VVTIRES); SetVehicleHealth(veh, VVHEALTH); VehicleInfo[veh][VSTATUS] = 6; SetVehicleParamsEx(veh, 0, 0, 0, 0, 0, 0, 0); } return 1; } |