if(dialogid == VSTORAGE && response) { if(PlayerVehicleInfo[playerid][listitem][pvSpawned]) { new Float: vehiclehealth; GetVehicleHealth(PlayerVehicleInfo[playerid][listitem][pvId], vehiclehealth); if(vehiclehealth < 750) { SendClientMessage(playerid, COLOR_WHITE, "This vehicle is too damaged to be stored."); } else { --PlayerCars; VehicleSpawned[playerid]--; PlayerVehicleInfo[playerid][listitem][pvSpawned] = 0; DestroyVehicle(PlayerVehicleInfo[playerid][listitem][pvId]); VehicleRadioStation[PlayerVehicleInfo[playerid][listitem][pvId]] = 0; PlayerVehicleInfo[playerid][listitem][pvId] = INVALID_PLAYER_VEHICLE_ID; new vstring[128]; format(vstring, sizeof(vstring), "You have stored your %s. The vehicle has been despawned.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]); ... . . . .so on..
Oh, But i'm not that good in scripting, still learning - How can i fix it ?, i mean add that missing variable ?..
|
new VehicleSpawned[MAX_PLAYERS];
Add:
pawn Код:
|
new VehicleSpawned;
error 029: invalid expression, assumed zero warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
if(dialogid == VSTORAGE && response) { if(PlayerVehicleInfo[playerid][listitem][pvSpawned]) { new Float: vehiclehealth; GetVehicleHealth(PlayerVehicleInfo[playerid][listitem][pvId], vehiclehealth); if(vehiclehealth < 750) { SendClientMessage(playerid, COLOR_WHITE, "This vehicle is too damaged to be stored."); } else { --PlayerCars; VehicleSpawned[playerid]--; PlayerVehicleInfo[playerid][listitem][pvSpawned] = 0; DestroyVehicle(PlayerVehicleInfo[playerid][listitem][pvId]); VehicleRadioStation[PlayerVehicleInfo[playerid][listitem][pvId]] = 0; PlayerVehicleInfo[playerid][listitem][pvId] = INVALID_PLAYER_VEHICLE_ID; new vstring[128]; format(vstring, sizeof(vstring), "You have stored your %s. The vehicle has been despawned.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]); SendClientMessage(playerid, COLOR_WHITE, vstring); } } else if(PlayerVehicleInfo[playerid][listitem][pvModelId] == 0) { SendClientMessage(playerid, COLOR_WHITE, "You can't spawn an non-existant vehicle."); } else if(PlayerVehicleInfo[playerid][listitem][pvImpounded]) { SendClientMessage(playerid, COLOR_WHITE, "You can't spawn an impounded vehicle. If you wish to reclaim it, do so at the DMV in Dillimore."); } else if(PlayerVehicleInfo[playerid][listitem][pvDisabled] == 1) { SendClientMessage(playerid, COLOR_WHITE, "You can't spawn a disabled vehicle. It is disabled due to your Donator level (vehicle restrictions)."); } else if(PlayerVehicleInfo[playerid][listitem][pvSpawned] == 0) { if(PlayerInfo[playerid][pDonateRank] == 0 && VehicleSpawned[playerid] >= 3) { SendClientMessage(playerid, COLOR_GREY, "As non-VIP you can only have 3 vehicle spawned. You must store a vehicle in order to spawn another one."); } else if(PlayerInfo[playerid][pDonateRank] == 1 && VehicleSpawned[playerid] >= 4) { SendClientMessage(playerid, COLOR_GREY, "As Bronze VIP you can only have 4 vehicles spawned. You must store a vehicle in order to spawn another one."); } else if(PlayerInfo[playerid][pDonateRank] == 2 && VehicleSpawned[playerid] >= 5) { SendClientMessage(playerid, COLOR_GREY, "As Silver VIP you can only have 5 vehicles spawned. You must store a vehicle in order to spawn another one."); } else if(PlayerInfo[playerid][pDonateRank] == 3 && VehicleSpawned[playerid] >= 6) { SendClientMessage(playerid, COLOR_GREY, "As Gold VIP you can only have 6 vehicles spawned. You must store a vehicle in order to spawn another one."); } else if(PlayerInfo[playerid][pDonateRank] == 4 && VehicleSpawned[playerid] >= 10) { SendClientMessage(playerid, COLOR_GREY, "As Platinum VIP you can only have 10 vehicles spawned. You must store a vehicle in order to spawn another one."); } else if(PlayerInfo[playerid][pDonateRank] == 5 && VehicleSpawned[playerid] >= 10){ SendClientMessage(playerid, COLOR_GREY, "As VIP Moderator you can only have 10 vehicles spawned. You must store a vehicle in order to spawn another one."); } else if(!(0 <= PlayerInfo[playerid][pDonateRank] <= 6)) { SendClientMessage(playerid, COLOR_GREY, "You have an invalid VIP level."); } else { ++PlayerCars; VehicleSpawned[playerid]++; PlayerVehicleInfo[playerid][listitem][pvSpawned] = 1; PlayerVehicleInfo[playerid][listitem][pvId] = CreateVehicle(PlayerVehicleInfo[playerid][listitem][pvModelId], PlayerVehicleInfo[playerid][listitem][pvPosX], PlayerVehicleInfo[playerid][listitem][pvPosY], PlayerVehicleInfo[playerid][listitem][pvPosZ], PlayerVehicleInfo[playerid][listitem][pvPosAngle],PlayerVehicleInfo[playerid][listitem][pvColor1], PlayerVehicleInfo[playerid][listitem][pvColor2], -1); //VehicleFuel[PlayerVehicleInfo[playerid][listitem][pvId]] = PlayerVehicleInfo[playerid][listitem][pvFuel]; if(PlayerVehicleInfo[playerid][listitem][pvLocked] == 1) LockPlayerVehicle(playerid, PlayerVehicleInfo[playerid][listitem][pvId], PlayerVehicleInfo[playerid][listitem][pvLock]); if(strlen(PlayerVehicleInfo[playerid][listitem][pvNumberPlate]) > 0) SetVehicleNumberPlate(PlayerVehicleInfo[playerid][listitem][pvId], PlayerVehicleInfo[playerid][listitem][pvNumberPlate]); LoadPlayerVehicleMods(playerid, listitem); new vstring[128]; format(vstring, sizeof(vstring), "You have taken your %s out of storage. The vehicle has been spawned at the last parking location.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]); SendClientMessage(playerid, COLOR_WHITE, vstring); } } else SendClientMessage(playerid, COLOR_WHITE, "You can't spawn a non-existent vehicle."); }